File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ def scan_tokens encoder, options
64
64
if match = scan ( / \s + | \\ \n /x )
65
65
if in_preproc_line && match != "\\ \n " && match . index ( ?\n)
66
66
in_preproc_line = false
67
+ case_expected = false
67
68
label_expected = label_expected_before_preproc_line
68
69
end
69
70
encoder . text_token match , :space
@@ -72,7 +73,6 @@ def scan_tokens encoder, options
72
73
encoder . text_token match , :comment
73
74
74
75
elsif match = scan ( / [-+*=<>?:;,!&^|()\[ \] {}~%]+ | \/ =? | \. (?!\d ) /x )
75
- label_expected = match =~ /[;\{ \} ]/
76
76
if case_expected
77
77
label_expected = true if match == ':'
78
78
case_expected = false
@@ -83,6 +83,7 @@ def scan_tokens encoder, options
83
83
kind = IDENT_KIND [ match ]
84
84
if kind == :ident && label_expected && !in_preproc_line && scan ( /:(?!:)/ )
85
85
kind = :label
86
+ label_expected = false
86
87
match << matched
87
88
else
88
89
label_expected = false
You can’t perform that action at this time.
0 commit comments