refactor lexer #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "primrose/haddock2:leana8959"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reduce manual usage of getPosition and setting it and improve some helper functions.
Do we support windows 🤔WIP: leana8959to WIP: refactor lexerWIP: refactor lexerto refactor lexerThank you so much!
@ -150,0 +137,4 @@<*> located closePdelimited :: Parser a -> Parser b -> Token -> Token -> Parser [LocatedToken]delimited openP closeP openTok closeTok = asList <$> delimitedAsTuple (openTok <$ openP) (closeTok <$ closeP)nice! do you want to do the same nice naming as delimitedAsTouple with open/close instead of a b?
That's a good idea, will do
@ -251,3 +247,3 @@mathsParens :: LexermathsParens = delimited (void $ "\\(") (void "\\)") MathsParenOpen MathsParenClosemathsParens = delimited "\\(" "\\)" MathsParenOpen MathsParenClose❤️
@ -46,3 +46,2 @@"\"MyModule.Name\""`shouldLexTo` [ (1, 1, Module), (1, 2, Token "MyModule.Name")`shouldLexTo` [ (1, 2, Module "MyModule.Name")Now here I am a bit unsure about what we want. Should the position match the inner value or the delimiters?
I actually don't know, should we even keep the quotes?
I wouldn’t keep it bc we for some representations we don’t need it and we can recreate for the ones we do.
@ -111,3 +108,4 @@`shouldLexTo` [ (1, 1, Escape), (1, 2, Token "(")]"\\(\r\n"🫡
e9280d63f8to6c0b4a4288bd07547e26toc4d59d32365073fc0e25to970b658926