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

Problem with parsing mixins arguments #56

Closed
villeu opened this issue Sep 22, 2013 · 1 comment
Closed

Problem with parsing mixins arguments #56

villeu opened this issue Sep 22, 2013 · 1 comment
Labels
Milestone

Comments

@villeu
Copy link

villeu commented Sep 22, 2013

There are some exceptions when parsing mixins. For example, I have mixins defined as follows:

mixin yyy(zzz)
| #{zzz}

mixin yyy2(zzz1, zzz2)
| #{zzz} #{zzz2}

And use of them in templates:

+yyy('blabla, sthsth')

here exception:

Caused by: class de.neuland.jade4j.exceptions.JadeCompilerException /D:/Projects/innuendo/server/frontend/app/views/index.jade:43
unable to evaluate ['blabla] - Tokenization de.neuland.jade4j.expression.ExpressionHandler.evaluateExpression@1:8 tokenization error in ''blabla'
at de.neuland.jade4j.parser.node.MixinInjectNode.writeVariables(MixinInjectNode.java:104)
at de.neuland.jade4j.parser.node.MixinInjectNode.execute(MixinInjectNode.java:42)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.compiler.Compiler.compile(Compiler.java:30)
at de.neuland.jade4j.template.JadeTemplate.process(JadeTemplate.java:23)
at de.neuland.jade4j.Jade4J.render(Jade4J.java:63)
at de.neuland.jade4j.Jade4J.render(Jade4J.java:58)
at de.neuland.jade4j.Jade4J$render.call(Unknown Source)
at de.neuland.jade4j.Jade4J$render.call(Unknown Source)

+yyy2('addApp(app)', 'deleteFromNewApps(app)')

here exception:

Caused by: class de.neuland.jade4j.exceptions.JadeCompilerException /D:/Projects/innuendo/server/frontend/app/views/index.jade:45
unable to evaluate ['addApp(app] - Tokenization de.neuland.jade4j.expression.ExpressionHandler.evaluateExpression@1:12 tokenization error near '... (app ...'
at de.neuland.jade4j.parser.node.MixinInjectNode.writeVariables(MixinInjectNode.java:104)
at de.neuland.jade4j.parser.node.MixinInjectNode.execute(MixinInjectNode.java:42)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.parser.node.TagNode.execute(TagNode.java:71)
at de.neuland.jade4j.parser.node.BlockNode.execute(BlockNode.java:16)
at de.neuland.jade4j.compiler.Compiler.compile(Compiler.java:30)
at de.neuland.jade4j.template.JadeTemplate.process(JadeTemplate.java:23)
at de.neuland.jade4j.Jade4J.render(Jade4J.java:63)
at de.neuland.jade4j.Jade4J.render(Jade4J.java:58)
at de.neuland.jade4j.Jade4J$render.call(Unknown Source)
at de.neuland.jade4j.Jade4J$render.call(Unknown Source)

@chbloemer
Copy link
Contributor

Added testcase issues/65.jade. Works in Version 1.0.0

@chbloemer chbloemer added this to the 1.0.0 milestone Nov 10, 2015
@chbloemer chbloemer added the bug label Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants