restrict the root, but expand for testing
This commit is contained in:
@ -17,3 +17,10 @@ require 'salama-reader'
|
||||
|
||||
require "minitest"
|
||||
require "minitest/autorun"
|
||||
|
||||
# for testing add expression as allowed root
|
||||
# bit of a hack: the directory name should be passed as the root if the parse fails
|
||||
# but moving on (and coming back)
|
||||
Parser::Salama.class_eval do
|
||||
rule(:root_body) {( class_definition | function_definition | expression )}
|
||||
end
|
||||
|
Reference in New Issue
Block a user