Skip to content
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

Always remove the token stack label #352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

download13
Copy link

_token_stack label was only removed when token-stack option was present.

_token_stack label was only removed when `token-stack` option was present.
GerHobbelt added a commit to GerHobbelt/jison that referenced this pull request Apr 9, 2017
zaach#352 as we now use a different mark-and-strip approach, which does not use JS labels anymore at all. Thus flagged as processed.

# Conflicts:
#	lib/jison.js
GerHobbelt added a commit to GerHobbelt/route-parser that referenced this pull request Sep 5, 2017
// Remove _token_stack label manually until fixed in jison:
// zaach/jison#351
// zaach/jison#352
@winrid
Copy link

winrid commented Dec 4, 2017

Ran into this recently, can this fix be merged?

@MoOx
Copy link

MoOx commented Jan 22, 2018

Would really like to see this merged as it's preventing me from bundling a project with webpack :(

MoOx added a commit to MoOx/reduce-css-calc that referenced this pull request Jan 22, 2018
@ftes
Copy link

ftes commented Aug 28, 2018

Anything missing here? Any way to help out?

@omervk
Copy link

omervk commented Feb 18, 2024

For those who are still seeing this issue, seven years in, I worked around this by creating a script to replace the CLI:

const cli = require('jison/lib/cli')

// This is a workaround for https://github.com/zaach/jison/pull/352 having never been merged
const oldProcessGrammars = cli.processGrammars

cli.processGrammars = function () {
    const grammar = oldProcessGrammars.apply(this, arguments)
    grammar.options = grammar.options ?? {}
    grammar.options['token-stack'] = true
    return grammar
}

cli.main({
    file: '', // TODO: Add your file path here
    outfile: '', // TODO: Add your output path here
    // TODO: Add any other options you want here
    'token-stack': true,
})

omervk added a commit to omervk/gamgee that referenced this pull request Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants