Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 92aec1d

Browse files
author
Juanjo Alvarez
committed
Added synthetic tokens for every keyword that makes sense
1 parent 5f13ca3 commit 92aec1d

File tree

1 file changed

+50
-30
lines changed

1 file changed

+50
-30
lines changed

driver/normalizer/parser.go

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,56 @@ var ToNoder = &native.ObjectToNoder{
2323
"noop_line": true, // Comment/Noop (non significative whitespace)
2424
},
2525
SyntheticTokens: map[string]string{
26-
"Print": "print",
27-
"Ellipsis": "PythonEllipsisOperator",
28-
"Add": "+",
29-
"Sub": "-",
30-
"Mult": "*",
31-
"Div": "/",
32-
"FloorDiv": "//",
33-
"Mod": "%%",
34-
"Pow": "**",
35-
"AugAssign": "?=",
36-
"BitAnd": "&",
37-
"BitOr": "|",
38-
"BitXor": "^",
39-
"LShift": "<<",
40-
"RShift": ">>",
41-
"Eq": "==",
42-
"NotEq": "!=",
43-
"Not": "!",
44-
"Lt": "<",
45-
"LtE": "<=",
46-
"Gt": ">",
47-
"GtE": ">=",
48-
"Is": "is",
49-
"IsNot": "not is",
50-
"In": "in",
51-
"NotIn": "not in",
52-
"UAdd": "+",
53-
"USub": "-",
54-
"Invert": "~",
55-
"Pass": "pass",
26+
"Add": "+",
27+
"Assert": "assert",
28+
"AugAssign": "?=",
29+
"BitAnd": "&",
30+
"BitOr": "|",
31+
"BitXor": "^",
32+
"Break": "break",
33+
"ClassDef": "class",
34+
"Continue": "continue",
35+
"Delete": "del",
36+
"Div": "/",
37+
"Ellipsis": "...",
38+
"ExceptHandler": "except",
39+
"Eq": "==",
40+
"False": "False",
41+
"For": "for",
42+
"FloorDiv": "//",
43+
"Global": "global",
44+
"Gt": ">",
45+
"GtE": ">=",
46+
"If": "if",
47+
"In": "in",
48+
"Invert": "~",
49+
"Is": "is",
50+
"IsNot": "not is",
51+
"Lambda": "lambda",
52+
"LShift": "<<",
53+
"Lt": "<",
54+
"LtE": "<=",
55+
"Mod": "%%",
56+
"Mult": "*",
57+
"None": "None",
58+
"Nonlocal": "nonlocal",
59+
"Not": "!",
60+
"NotEq": "!=",
61+
"NotIn": "not in",
62+
"Pass": "pass",
63+
"Pow": "**",
64+
"Print": "print",
65+
"Raise": "raise",
66+
"Return": "return",
67+
"RShift": ">>",
68+
"Sub": "-",
69+
"True": "true",
70+
"Try": "try",
71+
"UAdd": "+",
72+
"USub": "-",
73+
"While": "while",
74+
"With": "with",
75+
"Yield": "yield",
5676
},
5777
PromoteAllPropertyLists: false,
5878
PromotedPropertyLists: map[string]map[string]bool{

0 commit comments

Comments
 (0)