Created
July 25, 2018 16:12
-
-
Save iantanwx/8836d4303313ac23f9f4d637c534b666 to your computer and use it in GitHub Desktop.
PoC: Peg.js grammar for parsing JSON encoded Scilla types
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
BaseType = base:(Map/Uint/String) _* "(" vtypes: (type:VType _* {return type})* ")" { return { base: base, vtypes: vtypes }} | |
VType = Uint/String | |
Map = "Map" | |
Uint = "Uint" | |
String = "String" | |
_ = [ \t\n] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input:
Output: