moovweb / tritium

Tritium is a magical document modifying language. It's JavaScript-like and simple to learn. Think XSLT without the nightmare. It was designed by Hampton Catlin (@hcatlin), and has been heavily influenced by Aaron Leung (@akhleung).
http://tritium.io
Mozilla Public License 2.0
33 stars 7 forks source link

Malformed Expression with infix concat #18

Closed HamptonMakes closed 11 years ago

HamptonMakes commented 12 years ago

When I run this, it gives an error...

$a = "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a" + "a"
$a = $a + $a + $a + $a
$a = $a + $a + $a + $a
$a = $a + $a + $a + $a
set($a)

And that error is...

[2012/01/23 09:41:10 PST] [EROR] (tritium/spec._func_001:67) packages/base/test/complex/concat_huge === malformed expression
/Users/hcatlin/dev/moov/gohattan/src/tritium/src/tritium/parser/squid_parser.go:112 (0x58014)
(*Parser).expression: panic("malformed expression")
/Users/hcatlin/dev/moov/gohattan/src/tritium/src/tritium/parser/squid_parser.go:95 (0x57f65)
(*Parser).statement: node = p.expression()
akhleung commented 12 years ago

I can't reproduce the error. I should mention that I'm testing this by going into the src/tritium/parser folder and running 'make test'. It spits out what looks like a valid (albeit long) parse tree.

akhleung commented 12 years ago

Oh, specifically, put your code above into instructions.ts and run 'make test'. Should execute correctly.

HamptonMakes commented 12 years ago

Run...

./bin/tritium test packages/libxml/test/bugs

And it should fail.

On Jan 23, 2012, at 8:35 PM, Aaron Leung wrote:

Oh, specifically, put your code above into instructions.ts and run 'make test'. Should execute correctly.


Reply to this email directly or view it on GitHub: https://github.com/moovweb/tritium/issues/18#issuecomment-3627282

akhleung commented 12 years ago

I did that and nothing happened. (I just need to run it from the root of the tritium repo, right? Because I'm not seeing a bin folder anywhere....)

akhleung commented 11 years ago

This was resolved long ago.