-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Solidity (lexer and examples) #760
Commits on Mar 26, 2020
-
spec/lexers/sampes/demos: add Solidity lexer (squashed branch).
Squashed commits: spec/lexers: Solidity spec, based on tutorial's Turtle spec. samples: add Solidity sample (from pygments-lexer-solidity). See https://gitlab.com/veox/pygments-lexer-solidity. File permalink: https://gitlab.com/veox/pygments-lexer-solidity/blob/8e9919b5e9e91a2022def2a4c51003bc99042686/example.sol The Pygments lexer's example was written by me, and is licensed under a BSD license. demos: minimal Solidity demo. lexers: track solidity.rb (verbatim copy of c.rb). lexers/solidity: proper class, extensions, other meta stuff. lexers/solidity: added some keywords (not all!). lexers/solidity: remove float, added types TODO. lexers/solidity: constants, strings. lexers/solidity: clean-up + remove function state. lexers/solidity: complex MxN types. lexers: fix mimetype (`text/solidity` -> `text/x-solidity`). spec: comment guess-by-source section that makes tests fail. Test fails because something (?) is guessed as PlainText. lexers/solidity: add missing `assert` and `require` keywords (+ demos/solidity: rewrite). A few more keywords may well be missing. Used https://github.com/ethereum/solidity/blob/0a04a35a2e02437ae038af41c947b3e829946bca/libsolidity/parsing/Token.h to check - probably should look for "preprocessor" directives, or built-ins, or the like, - in Solidity's source tree. demos/solidity: fix to compile. lexers/solidity: populate builtins + remove a few more C lexer leftovers. SQ
Configuration menu - View commit details
-
Copy full SHA for afd8be9 - Browse repository at this point
Copy the full SHA afd8be9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 672ee0a - Browse repository at this point
Copy the full SHA 672ee0aView commit details -
lexers/solidity: add new keywords mentioned in feedback.
This is done before "porting" in changes from Pygments' lexer, so it's out of the way.
Configuration menu - View commit details
-
Copy full SHA for d5f6378 - Browse repository at this point
Copy the full SHA d5f6378View commit details -
lexers/solidity: add changes up to (mostly) Solidity v0.4.22.
These are "ported" from Pygments' lexer. I'm not 100% on the terminology.
Configuration menu - View commit details
-
Copy full SHA for e1b6522 - Browse repository at this point
Copy the full SHA e1b6522View commit details -
lexers/solidity: add new keywords from Solidity v0.6.0.
Natspec, Assembly, Yul, and some built-in functions are still unimplemented.
Configuration menu - View commit details
-
Copy full SHA for e65c995 - Browse repository at this point
Copy the full SHA e65c995View commit details -
Configuration menu - View commit details
-
Copy full SHA for 612c65b - Browse repository at this point
Copy the full SHA 612c65bView commit details -
lexers/solidity: mark regexes in rules explicitly.
This calms down Rake warnings about ambivalence.
Configuration menu - View commit details
-
Copy full SHA for dbec54a - Browse repository at this point
Copy the full SHA dbec54aView commit details -
spec/solidity: uncomment and fix "test by source".
The issue was that the line is not technically a shebang. So, use a `starts_with?` instead.
Configuration menu - View commit details
-
Copy full SHA for c219854 - Browse repository at this point
Copy the full SHA c219854View commit details
Commits on Mar 31, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a8ee009 - Browse repository at this point
Copy the full SHA a8ee009View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7692571 - Browse repository at this point
Copy the full SHA 7692571View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ca9556 - Browse repository at this point
Copy the full SHA 9ca9556View commit details -
Configuration menu - View commit details
-
Copy full SHA for aded449 - Browse repository at this point
Copy the full SHA aded449View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ba1cf7 - Browse repository at this point
Copy the full SHA 4ba1cf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f416146 - Browse repository at this point
Copy the full SHA f416146View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a14012 - Browse repository at this point
Copy the full SHA 2a14012View commit details -
lexers/solidity: update
[u]fixed{M}x{N}
types to "new" scheme.Don't remember when it changed, but sample file already had the "new" scheme used + comments to support it, so I guess Solidity v0.5.0 or so.
Configuration menu - View commit details
-
Copy full SHA for a828d47 - Browse repository at this point
Copy the full SHA a828d47View commit details
Commits on Apr 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8b09d51 - Browse repository at this point
Copy the full SHA 8b09d51View commit details
Commits on Apr 2, 2020
-
lexers/solidity: user regex to match [u]fixed{M}x{N} instead.
As requested by @pyrmont, for performance's sake: rouge-ruby#760 (comment)
Configuration menu - View commit details
-
Copy full SHA for 5f81d9b - Browse repository at this point
Copy the full SHA 5f81d9bView commit details
Commits on Apr 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 6f793ba - Browse repository at this point
Copy the full SHA 6f793baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2242a4d - Browse repository at this point
Copy the full SHA 2242a4dView commit details -
lexers/solidity: remove duplicate rule for (block|msg|tx).{stuff}.
They are already covered in `def self.builtins`.
Configuration menu - View commit details
-
Copy full SHA for d7ccc70 - Browse repository at this point
Copy the full SHA d7ccc70View commit details
Commits on Apr 4, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f19341e - Browse repository at this point
Copy the full SHA f19341eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b42435 - Browse repository at this point
Copy the full SHA 8b42435View commit details
Commits on Apr 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 6d46215 - Browse repository at this point
Copy the full SHA 6d46215View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8d3f3f - Browse repository at this point
Copy the full SHA c8d3f3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e824fa - Browse repository at this point
Copy the full SHA 2e824faView commit details -
Configuration menu - View commit details
-
Copy full SHA for b56f33c - Browse repository at this point
Copy the full SHA b56f33cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 479a6d2 - Browse repository at this point
Copy the full SHA 479a6d2View commit details -
samples/solidity: make example of comment-to-EOF more wordy.
Outline also why there should be no multi-level comments, demonstrate it, and allow for reasonably bloodless manual testing by removing spaces.
Configuration menu - View commit details
-
Copy full SHA for 8b471bb - Browse repository at this point
Copy the full SHA 8b471bbView commit details -
lexers/solidity: add missing
abi.decode
.Thanks @axic! Co-Authored-By: Alex Beregszaszi <alex@rtfs.hu>
Configuration menu - View commit details
-
Copy full SHA for 103718e - Browse repository at this point
Copy the full SHA 103718eView commit details -
samples/solidity: split no-multiline-nesting and multiline-to-eof cases.
Two visual demo cases got conflated: the initial one of multiline comments being open until the end of file, and the new one of no such thing as nested multiline comment blocks. This commits separates them.
Configuration menu - View commit details
-
Copy full SHA for 1555984 - Browse repository at this point
Copy the full SHA 1555984View commit details