summaryrefslogtreecommitdiff
path: root/sci2jslex.py
diff options
context:
space:
mode:
Diffstat (limited to 'sci2jslex.py')
-rwxr-xr-xsci2jslex.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/sci2jslex.py b/sci2jslex.py
index abf513e4..a3d973c7 100755
--- a/sci2jslex.py
+++ b/sci2jslex.py
@@ -82,6 +82,22 @@ t_ignore = ' \t'
t_qstring_ignore = ''
t_dqstring_ignore = ''
+def t_COMMA_COMMENT(t):
+ r',[ \t]*//.*'
+ global afterarray, brackets
+ if brackets != 0:
+ afterarray = False
+ t.type = 'COMMA'
+ return t
+
+def t_SEMICOLON_COMMENT(t):
+ r';[ \t]*//.*'
+ global afterarray, brackets
+ if brackets != 0:
+ afterarray = False
+ t.type = 'SEMICOLON'
+ return t
+
def t_COMMENT(t):
r'\.\.+[ \t]*(//.*)?(\n|$)|//.*'
pass