-
Notifications
You must be signed in to change notification settings - Fork 15
/
LuaSynTree.cpp
53 lines (51 loc) · 1.77 KB
/
LuaSynTree.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// This file was automatically generated by EbnfStudio; don't modify it!
#include "LuaSynTree.h"
using namespace Lua;
SynTree::SynTree(quint16 r, const Token& t ):d_tok(r){
d_tok.d_lineNr = t.d_lineNr;
d_tok.d_colNr = t.d_colNr;
d_tok.d_sourcePath = t.d_sourcePath;
}
const char* SynTree::rToStr( quint16 r ) {
switch(r) {
case R_Lua: return "Lua";
case R_args: return "args";
case R_assigOrCall_: return "assigOrCall_";
case R_assignment_: return "assignment_";
case R_binop: return "binop";
case R_block: return "block";
case R_call_: return "call_";
case R_chunk: return "chunk";
case R_comment_: return "comment";
case R_desig_: return "desig_";
case R_dostat_: return "dostat_";
case R_exp: return "exp";
case R_explist: return "explist";
case R_field: return "field";
case R_fieldlist: return "fieldlist";
case R_fieldsep: return "fieldsep";
case R_forstat_: return "forstat_";
case R_funcbody: return "funcbody";
case R_funcname: return "funcname";
case R_functioncall_: return "functioncall";
case R_gfuncdecl_: return "gfuncdecl_";
case R_ifstat_: return "ifstat_";
case R_index_: return "index_";
case R_lambdecl_: return "lambdecl_";
case R_laststat: return "laststat";
case R_lfuncdecl_: return "lfuncdecl_";
case R_localdecl_: return "localdecl_";
case R_lvardecl_: return "lvardecl_";
case R_namelist: return "namelist";
case R_parlist: return "parlist";
case R_prefixexp: return "prefixexp";
case R_repeatstat_: return "repeatstat_";
case R_stat: return "stat";
case R_tableconstructor: return "tableconstructor";
case R_unop: return "unop";
case R_var_: return "var";
case R_varlist_: return "varlist";
case R_whilestat_: return "whilestat_";
default: if(r<R_First) return tokenTypeName(r); else return "";
}
}