ReferenceError: head is not defined
See original GitHub issueHello & thank you for your work on peggy and for picking up where pegjs left off.
I’m one of the maintainers of amqplib and investigating https://github.com/amqp-node/amqplib/issues/453. amqplib uses pegjs via bitsyntax to generate a parser from the grammar specified here.
bitsyntax’s last working parser was generated using pegjs@0.7.0 and upgrading to pegjs@0.1.0, peggy@^1.0.0 or peggy@latest results in a broken parser.
/Users/steve/Development/squaremo/bitsyntax-js/lib/parser.js:256
var peg$f17 = function() { return head + tail.join(''); };
^
ReferenceError: head is not defined
I’m completely new to pegjs/peggy and was hoping it’s an easy fix. Can you give me any pointers please?
Thanks
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: head is not defined #6 - GitHub
Hi! running the plugin with the current version of reveal.js (3.8) causes a Reference Error: toolbar.js:41 Uncaught ReferenceError: head is ...
Read more >javascript - Next.js - Head element doesn't work - Stack Overflow
1 Answer 1 · I haven't written the Head component by myself. It goes from Next.js. – user3309314 · @user3309314 Look again at...
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >How to Fix Uncaught ReferenceError: $ is not defined in jQuery
The most common reason behind the error "Uncaught ReferenceError: $ is not defined" is executing the jQuery code before the jQuery library file...
Read more >How to fix ReferenceError: Document is not defined ... - Sabe.io
The best way to resolve this is to just move your code to the bottom of the page so that the document will...
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

Actually, your original grammar worked because of a bug, fixed in pegjs@0.10.0:
Also, you could simplify your grammar much more using a new
@operator, for example, here:and using a
$operator instead ofreturn text():Let us know if you’d like more help with the grammar. Happy to pitch in as needed.