Closed bfontaine closed 5 years ago
From a grammar perspective, nil, true, and false, are symbols just like a or foobar. This allows us to factorize the way we parse all of them.
nil
true
false
a
foobar
This also fixes an issue where nil. was lexed as NIL Symbol(.) because t_NIL’s regex doesn’t have the lookahead part t_BOOLEAN’s has.
nil.
NIL Symbol(.)
t_NIL
t_BOOLEAN
From a grammar perspective,
nil
,true
, andfalse
, are symbols just likea
orfoobar
. This allows us to factorize the way we parse all of them.This also fixes an issue where
nil.
was lexed asNIL Symbol(.)
becauset_NIL
’s regex doesn’t have the lookahead partt_BOOLEAN
’s has.