ext/rbs_extension/lexstate.c in rbs-3.5.0.pre.2 vs ext/rbs_extension/lexstate.c in rbs-3.5.0
- old
+ new
@@ -75,10 +75,12 @@
"tOPERATOR", /* Operator identifier */
"tCOMMENT",
"tLINECOMMENT",
+ "tTRIVIA",
+
"tDQSTRING", /* Double quoted string */
"tSQSTRING", /* Single quoted string */
"tINTEGER", /* Integer */
"tSYMBOL", /* Symbol */
"tDQSYMBOL",
@@ -118,10 +120,12 @@
t.type = type;
t.range.start = state->start;
t.range.end = state->current;
state->start = state->current;
- state->first_token_of_line = false;
+ if (type != tTRIVIA) {
+ state->first_token_of_line = false;
+ }
return t;
}
void rbs_skip(lexstate *state) {