Unlike all the other keywords, the flanked \b are missing in regex and they match on any token starting with sahi / galat instead of matching on the word sahi / galat. Refer to this \b assertion
I have also added couple of tests (examples mentioned above are the tests)
Tasks
Context
Try this code in bhai lang playground
Now bhai is mad because he thinks
sahiValue
is the literal boolean valuesahi
and not as an identifier. Same thing occurs withgalat
These line in the spec are to blame https://github.com/DulLabs/bhai-lang/blob/10e6b024f057316b0f97305bdc460f46201ceb19/packages/parser/src/constants/bhaiLangSpec.ts#L95-L96Unlike all the other keywords, the flanked
\b
are missing in regex and they match on any token starting withsahi
/galat
instead of matching on the wordsahi
/galat
. Refer to this \b assertionI have also added couple of tests (examples mentioned above are the tests)