Skip to content

Conversation

@refi64
Copy link
Contributor

@refi64 refi64 commented Aug 3, 2019

May I present to you, the ultimate nightmare lexer.

Basically, we've got four very, very different syntaxes to support, but they have enough common ground that leaving them in fully different modes results in a ton of ugly duplication.

I was originally going to play around with an okay-ish editorconfig bundle, but then I realized the file didn't look pretty to edit and got a bit sidetracked...

@nilnor
Copy link
Contributor

nilnor commented Aug 9, 2019

I think it might actually be better to accept some duplication over having this many conditionals inside the lexer. Whatever definitions can be reused could placed in a shared lexer module. Having everything in one lexer makes it very hard to reason about.

@refi64
Copy link
Contributor Author

refi64 commented Oct 10, 2019

Hmm I think I might have a nice way to avoid too much reuse, will start toying with it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants