aboutsummaryrefslogtreecommitdiff
path: root/src/MoonP/moon_ast.cpp
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-01-30 16:06:32 +0800
committerLi Jin <dragon-fly@qq.com>2020-01-30 16:06:32 +0800
commitc62d9eb35a310e7663234526ce4b9fe3519ca7cf (patch)
tree56b4b418aadab90989e3e29e29e8ab7e04806e8d /src/MoonP/moon_ast.cpp
parent240b1ec4a49128c00a787e6d0928865995b1d02e (diff)
downloadyuescript-c62d9eb35a310e7663234526ce4b9fe3519ca7cf.tar.gz
yuescript-c62d9eb35a310e7663234526ce4b9fe3519ca7cf.tar.bz2
yuescript-c62d9eb35a310e7663234526ce4b9fe3519ca7cf.zip
Separate MoonParser from MoonCompiler, make moonc compile multiple file in threads.
Diffstat (limited to 'src/MoonP/moon_ast.cpp')
-rw-r--r--src/MoonP/moon_ast.cpp120
1 files changed, 0 insertions, 120 deletions
diff --git a/src/MoonP/moon_ast.cpp b/src/MoonP/moon_ast.cpp
deleted file mode 100644
index f14fa74..0000000
--- a/src/MoonP/moon_ast.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
1/* Copyright (c) 2020 Jin Li, http://www.luvfight.me
2
3Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
5The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
7THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
8
9#include "MoonP/moon_ast.h"
10
11namespace MoonP {
12
13#define AST_IMPL(type) \
14 ast<type##_t> __##type##_t(type);
15
16AST_IMPL(Num)
17AST_IMPL(Name)
18AST_IMPL(Variable)
19AST_IMPL(LuaKeyword)
20AST_IMPL(self)
21AST_IMPL(self_name)
22AST_IMPL(self_class)
23AST_IMPL(self_class_name)
24AST_IMPL(SelfName)
25AST_IMPL(KeyName)
26AST_IMPL(VarArg)
27AST_IMPL(local_flag)
28AST_IMPL(Seperator)
29AST_IMPL(NameList)
30AST_IMPL(Local)
31AST_IMPL(colon_import_name)
32AST_IMPL(import_literal_inner)
33AST_IMPL(ImportLiteral)
34AST_IMPL(ImportFrom)
35AST_IMPL(ImportAs)
36AST_IMPL(Import)
37AST_IMPL(Backcall)
38AST_IMPL(ExpListLow)
39AST_IMPL(ExpList)
40AST_IMPL(Return)
41AST_IMPL(With)
42AST_IMPL(SwitchCase)
43AST_IMPL(Switch)
44AST_IMPL(IfCond)
45AST_IMPL(If)
46AST_IMPL(Unless)
47AST_IMPL(While)
48AST_IMPL(for_step_value)
49AST_IMPL(For)
50AST_IMPL(ForEach)
51AST_IMPL(Do)
52AST_IMPL(Comprehension)
53AST_IMPL(comp_value)
54AST_IMPL(TblComprehension)
55AST_IMPL(star_exp)
56AST_IMPL(CompForEach)
57AST_IMPL(CompFor)
58AST_IMPL(CompInner)
59AST_IMPL(Assign)
60AST_IMPL(update_op)
61AST_IMPL(Update)
62AST_IMPL(BinaryOperator)
63AST_IMPL(BackcallOperator)
64AST_IMPL(Assignable)
65AST_IMPL(AssignableChain)
66AST_IMPL(exp_op_value)
67AST_IMPL(Exp)
68AST_IMPL(Callable)
69AST_IMPL(ChainValue)
70AST_IMPL(simple_table)
71AST_IMPL(SimpleValue)
72AST_IMPL(Value)
73AST_IMPL(LuaStringOpen);
74AST_IMPL(LuaStringContent);
75AST_IMPL(LuaStringClose);
76AST_IMPL(LuaString)
77AST_IMPL(SingleString)
78AST_IMPL(double_string_inner)
79AST_IMPL(double_string_content)
80AST_IMPL(DoubleString)
81AST_IMPL(String)
82AST_IMPL(Parens)
83AST_IMPL(DotChainItem)
84AST_IMPL(ColonChainItem)
85AST_IMPL(default_value)
86AST_IMPL(Slice)
87AST_IMPL(Invoke)
88AST_IMPL(existential_op)
89AST_IMPL(TableLit)
90AST_IMPL(TableBlock)
91AST_IMPL(class_member_list)
92AST_IMPL(ClassBlock)
93AST_IMPL(ClassDecl)
94AST_IMPL(export_values)
95AST_IMPL(export_op)
96AST_IMPL(Export)
97AST_IMPL(variable_pair)
98AST_IMPL(normal_pair)
99AST_IMPL(FnArgDef)
100AST_IMPL(FnArgDefList)
101AST_IMPL(outer_var_shadow)
102AST_IMPL(FnArgsDef)
103AST_IMPL(fn_arrow)
104AST_IMPL(FunLit)
105AST_IMPL(NameOrDestructure)
106AST_IMPL(AssignableNameList)
107AST_IMPL(InvokeArgs)
108AST_IMPL(const_value)
109AST_IMPL(unary_exp)
110AST_IMPL(ExpListAssign)
111AST_IMPL(if_else_line)
112AST_IMPL(unless_line)
113AST_IMPL(statement_appendix)
114AST_IMPL(BreakLoop)
115AST_IMPL(Statement)
116AST_IMPL(Body)
117AST_IMPL(Block)
118AST_IMPL(File)
119
120} // namespace MoonP