X Tutup
Skip to content

Better require search#1379

Merged
Perryvw merged 6 commits intomasterfrom
better-require-search
Jan 12, 2023
Merged

Better require search#1379
Perryvw merged 6 commits intomasterfrom
better-require-search

Conversation

@Perryvw
Copy link
Member

@Perryvw Perryvw commented Jan 8, 2023

Wrote a custom parser that only knows require statements, comments and string literals. This allows us to replace the regex we were previously using to avoid false-positive requires we would try to resolve/rewrite while they shouldn't be. The parser works by just scanning the lua file for require statements, and fast-forwarding through any string or comment.

Fixes #1330 and #1376

@Perryvw Perryvw linked an issue Jan 8, 2023 that may be closed by this pull request
@Perryvw Perryvw merged commit c9fdd5c into master Jan 12, 2023
@Perryvw Perryvw deleted the better-require-search branch January 12, 2023 19:52
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.

TypeScriptToLua modifies strings which contain lua code findRequiredPaths match require keyword in comment of external lua code

1 participant

X Tutup