feat: godot, webassembly, mongodb, powershell, vim, cobol, ruby, php, c++ and c# - #86
Open
lvolland wants to merge 11 commits into
Open
feat: godot, webassembly, mongodb, powershell, vim, cobol, ruby, php, c++ and c##86lvolland wants to merge 11 commits into
lvolland wants to merge 11 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the ten boxes on #17: godot, webassembly, mongodb, powershell, vim, cobol, ruby, php, c++, c#.
one commit per language, each touching only its own files plus the three shared lines, so you
can drop any of them without unpicking the rest.
shj-lang-cobolshj-lang-cppshj-lang-csshj-lang-gdshj-lang-mongodbshj-lang-phpshj-lang-ps1shj-lang-rbshj-lang-vimshj-lang-watverified
that last line is the one that mattered. a detection regex is the only way a new language can
break an existing one, so every entry was tested against the whole fixture set, and four
languages ship with no detection at all because the candidate regex had real false positives:
wat—\b(local|global)\.(get|set|tee)\balso matches ordinary java, js and pythongd—@export-style prefixes collide with jsdoc tags and python decoratorsmongodb— matches pymongops1—Verb-Nounis also how title case works in prosecppis registered at weight 500 rather than 100:std::coutcannot occur in valid c, and at100 the six
#includelines in the fixture madecwin on volume.what the review pass caught
each grammar was written, then attacked by a second pass whose job was to break it. eight of the
ten came back with real defects, fixed before this branch existed. the ones worth naming:
\b[\w-]+[ \t]+(DIVISION|SECTION)\bwas quadratic#[Attribute]was swallowed whole by the#comment branch, and a?>inside a//comment never handed control back to html
\w+after<<, soa << bopened a string"""string leaked, and7%2was read as a%variable@"register opened astring that ate the rest of the line
known limits, stated rather than hidden
(; … ;)in wat stops at the first;)— the same compromisec.jsalready makes for/* */""") have no rule yetfuncrule idiom (/[a-z_]\w*(?=\s*\()/) is quadratic on a very long identifier with noparen — measured at 480-500 ms on 20 000 chars. that is not new:
c,py,rsandjavaallscore within 40 ms of each other on the same input, so i kept the shared idiom rather than make
these ten diverge. flagging it because it is the repo's slowest path, not because of this pr
notes
rb,cpp,cs,ps1,gd,wat), full name in the readme table.mongodbandcobolhave no natural short form,so they are spelled out. all of that is yours to overrule
webassemblyis 11 wide and the column was 10. it is whitespace only and safe to dropdist/untouched