Code Snippets PEG.js

Short texts PEG.js 🧑‍💻 Code snippets PEG.js ✍️ Reading lists PEG.js 👀

Jetpack Compose-like Parser in PEG.js

// leading comment MyCard { Text /* comment before props */ ( // comment before “prop” the prop prop // comment after props ) Button(prop2,prop3=test,) MyCard() // comment before children {} slot:footer { Button(onClick=test1) { Text(text=Hello) } } // comment after children } // TODO: // 1. ValueExpression // 2. props support unnamed props Layout […]

PEG.JS file for JSON5

This is a modified PEG.js JSON5 parser, it supports DateTime “`yaml { foo: 123, bar: “dfgfdgfd”, baz: 2012-05-29T04:21:20.031Z, } “` converts to “` { “foo”: 123, “bar”: “dfgfdgfd”, “baz”: } “` /* MIT License Copyright (c) 2019 Jordan Tucker Permission is hereby granted, free of charge, to any person obtaining a copy of this software […]