Optional line endings for `GrammarError.format`
See original GitHub issueAlso in peg$SyntaxError.prototype.format in generate-js.js. We always use "\n" for line endings. Although this probably works in modern Windows, for most cases, it’s probably better to have a default second parameter for lineEnding. From the CLI, we can pass in node’s os.EOL. We can’t use os in the generated code, since it needs to run in the browser.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Configuring Git to handle line endings - GitHub Docs
Refreshing a repository after changing line endings ... You can use it as a template for your repositories: ... This is a good...
Read more >Lexical grammar - JavaScript - MDN Web Docs
This page describes JavaScript's lexical grammar. JavaScript source text is just a sequence of characters — in order for the interpreter to ...
Read more >Grammar Reference - Lark documentation - Read the Docs
Grammars in Lark are based on EBNF syntax, with several enhancements. EBNF is basically a short-hand for common BNF patterns. Optionals are expanded:...
Read more >intro comp Flashcards - Quizlet
17) What feature must be turned on for you to see paragraph breaks, line breaks, spaces, tabs, and other formatting symbols? D. Show/Hide....
Read more >Word 2016 Basic - Quick Reference Card
and click at the end of a text block. ... Select a Line of Text: Click in the left margin for ... Ignore...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

peg.jssupported many old browsers, and there are a good number of people using it there, from what I can tell. Some of them should probably be pre-compiling their grammars, and we should probably change the docs to make that more clear. Sincepeg.jssupported it, and we care about backward-compatibility, we need to support it too. If nothing else, the online playground is a useful tool for people to learn about Peggy.I’m open to dropping support for IE 11, which I’ll probably argue for in 3.0, which will mean we will be able to modernize the browser-bound JS quite a bit.
Note that we do use node libraries in the CLI, where we know that the environment is going to be node.
I thought regarding new line and does not seem to be very important at this point, because existing implementation has proved itself as is.