Closed salmanahmad closed 12 years ago
[zahanm@dhcp athena] (master) $ dog compile athena
Error: An unknown compilation error occured:
undefined method `compile' for nil:NilClass
/Users/zahanm/Documents/Research/langdog/lib/dog/parser/nodes.rb:561:in `compile': undefined method `compile' for nil:NilClass (NoMethodError)
from /Users/zahanm/Documents/Research/langdog/lib/dog/parser/nodes.rb:106:in `block in compile'
from /Users/zahanm/Documents/Research/langdog/lib/dog/parser/nodes.rb:105:in `each'
It's the Assign
node, but I don't want to remove the value.compile(package)
as I'm not sure what it does.
At nodes.rb:167, though I haven't gotten to the stage of this executing yet, I'm pretty sure there's a problem here since @optional_arguments
should be a hash, not an array
So it won't have the .each_index
function.
@zahanm Optional args indeed broken at this point. Furthermore, the fix is unfortunately more complicated than switching out each_index
with something else because there needs to be some fundamental reworking to the call stack to get the default value to work correctly. Which I why I just kept the each_index
for now - to ensure that the appropriate test cases fail correctly.
That being said, you can still pass in optional arguments and it will work just fine - you just cannot declare them in the function definition and rely on their defaults at the moment.
@salmanahmad Further digging shows that v0.2 is actually choking up on
learner = PERSON FROM goal
In the Assign
node. Any ideas?
Unfortunately I need PERSON FROM
to work to make any progress on Athena.
I will be using this pull request to add changes that need to be merged into v0.2. From now on, we will be treating v0.2 as a merge-only integration branch. All my development work will be made on v0.2-salman.