diff options
| author | John Hodge <tpg@mutabah.net> | 2016-11-02 20:32:13 +0800 |
|---|---|---|
| committer | John Hodge <tpg@mutabah.net> | 2016-11-02 20:32:13 +0800 |
| commit | b71e1546a794843d73d28a7f66bcab50c387d83d (patch) | |
| tree | f13fe8cc2a537eac0c480523d64ef3737c0fe47c /src/expand | |
| parent | 983ff1c26e15a13e6a1e0e4bb1e964ec496a4777 (diff) | |
| download | mrust-b71e1546a794843d73d28a7f66bcab50c387d83d.tar.gz | |
Parse - Refactor TTStream and TokenTree into their own files
Diffstat (limited to 'src/expand')
| -rw-r--r-- | src/expand/asm.cpp | 1 | ||||
| -rw-r--r-- | src/expand/cfg.cpp | 9 | ||||
| -rw-r--r-- | src/expand/concat.cpp | 3 | ||||
| -rw-r--r-- | src/expand/env.cpp | 1 | ||||
| -rw-r--r-- | src/expand/file_line.cpp | 6 | ||||
| -rw-r--r-- | src/expand/format_args.cpp | 2 | ||||
| -rw-r--r-- | src/expand/include.cpp | 4 | ||||
| -rw-r--r-- | src/expand/macro_rules.cpp | 1 | ||||
| -rw-r--r-- | src/expand/rustc_diagnostics.cpp | 1 | ||||
| -rw-r--r-- | src/expand/stringify.cpp | 6 |
10 files changed, 28 insertions, 6 deletions
diff --git a/src/expand/asm.cpp b/src/expand/asm.cpp index 783e6a20..3ca7bb72 100644 --- a/src/expand/asm.cpp +++ b/src/expand/asm.cpp @@ -8,6 +8,7 @@ #include <common.hpp> #include <synext_macro.hpp> #include <parse/tokentree.hpp> +#include <parse/ttstream.hpp> class CAsmExpander: public ExpandProcMacro diff --git a/src/expand/cfg.cpp b/src/expand/cfg.cpp index 0a4617cf..00e3921c 100644 --- a/src/expand/cfg.cpp +++ b/src/expand/cfg.cpp @@ -1,9 +1,14 @@ /* + * MRustC - Rust Compiler + * - By John Hodge (Mutabah/thePowersGang) + * + * expand/cfg.hpp + * - cfg! and #[cfg] handling */ #include <synext.hpp> -#include <parse/tokentree.hpp> -#include <parse/lex.hpp> #include <parse/common.hpp> +#include <parse/tokentree.hpp> +#include <parse/ttstream.hpp> #include "cfg.hpp" #include <ast/expr.hpp> // Needed to clear a ExprNodeP #include <ast/crate.hpp> diff --git a/src/expand/concat.cpp b/src/expand/concat.cpp index c15be18b..7475325a 100644 --- a/src/expand/concat.cpp +++ b/src/expand/concat.cpp @@ -9,7 +9,8 @@ #include "../parse/common.hpp" #include "../parse/parseerror.hpp" #include "../parse/tokentree.hpp" -#include "../parse/lex.hpp" +#include "../parse/ttstream.hpp" +#include "../parse/lex.hpp" // For Codepoint #include <ast/expr.hpp> class CConcatExpander: diff --git a/src/expand/env.cpp b/src/expand/env.cpp index 85742549..db51fa67 100644 --- a/src/expand/env.cpp +++ b/src/expand/env.cpp @@ -7,6 +7,7 @@ */ #include <synext_macro.hpp> #include <parse/common.hpp> +#include <parse/ttstream.hpp> #include <ast/expr.hpp> // ExprNode_* #include <synext.hpp> // for Expand_BareExpr diff --git a/src/expand/file_line.cpp b/src/expand/file_line.cpp index 8ce56436..a485fe61 100644 --- a/src/expand/file_line.cpp +++ b/src/expand/file_line.cpp @@ -1,7 +1,13 @@ /* + * MRustC - Rust Compiler + * - By John Hodge (Mutabah/thePowersGang) + * + * expand/file_line.cpp + * - file! line! and macro_path! macros */ #include <synext.hpp> #include "../parse/common.hpp" +#include "../parse/ttstream.hpp" class CExpanderFile: public ExpandProcMacro diff --git a/src/expand/format_args.cpp b/src/expand/format_args.cpp index 4857a6c2..6881e19a 100644 --- a/src/expand/format_args.cpp +++ b/src/expand/format_args.cpp @@ -10,7 +10,7 @@ #include "../parse/common.hpp" #include "../parse/parseerror.hpp" #include "../parse/tokentree.hpp" -#include "../parse/lex.hpp" +#include "../parse/ttstream.hpp" #include "../parse/interpolated_fragment.hpp" #include <ast/crate.hpp> // for m_load_std #include <ast/expr.hpp> // for ExprNode_* diff --git a/src/expand/include.cpp b/src/expand/include.cpp index b7fe0f53..83a2aa03 100644 --- a/src/expand/include.cpp +++ b/src/expand/include.cpp @@ -8,8 +8,8 @@ #include <synext_macro.hpp> #include <parse/common.hpp> #include <parse/parseerror.hpp> // for GET_CHECK_TOK -#include <parse/tokentree.hpp> // TTStream -#include <parse/lex.hpp> +#include <parse/ttstream.hpp> +#include <parse/lex.hpp> // Lexer (new files) #include <ast/expr.hpp> namespace { diff --git a/src/expand/macro_rules.cpp b/src/expand/macro_rules.cpp index c460e35d..163504db 100644 --- a/src/expand/macro_rules.cpp +++ b/src/expand/macro_rules.cpp @@ -13,6 +13,7 @@ #include "../ast/expr.hpp" #include "../ast/ast.hpp" #include "../parse/common.hpp" +#include "../parse/ttstream.hpp" #include <ast/crate.hpp> #include "macro_rules.hpp" #include <macro_rules/macro_rules.hpp> diff --git a/src/expand/rustc_diagnostics.cpp b/src/expand/rustc_diagnostics.cpp index e9990a93..b5337d26 100644 --- a/src/expand/rustc_diagnostics.cpp +++ b/src/expand/rustc_diagnostics.cpp @@ -7,6 +7,7 @@ */ #include <synext.hpp> #include <parse/common.hpp> // TokenTree etc +#include <parse/ttstream.hpp> class CExpanderRegisterDiagnostic: public ExpandProcMacro diff --git a/src/expand/stringify.cpp b/src/expand/stringify.cpp index 2d70ca27..ce16847b 100644 --- a/src/expand/stringify.cpp +++ b/src/expand/stringify.cpp @@ -1,7 +1,13 @@ /* + * MRustC - Rust Compiler + * - By John Hodge (Mutabah/thePowersGang) + * + * expand/stringify.cpp + * - stringify! macro */ #include <synext.hpp> #include "../parse/common.hpp" +#include "../parse/ttstream.hpp" class CExpander: public ExpandProcMacro |
