lib/wlang/rulesets/imperative_ruleset.rb in wlang-0.9.2 vs lib/wlang/rulesets/imperative_ruleset.rb in wlang-0.10.0
- old
+ new
@@ -25,11 +25,11 @@
# hosting language. Evaluates it, looking for a boolean value (according to
# boolean semantics of the hosting language). If true, instantiates #2,
# otherwise instantiates #3 if present.
#
def self.conditional(parser, offset)
- expression, reached = parser.parse(offset, "wlang/ruby")
+ expression, reached = parser.parse(offset, "wlang/hosted")
value = parser.evaluate(expression)
if value
then_block, reached = parser.parse_block(reached)
if parser.has_block?(reached)
else_block, reached = parser.parse_block(reached, "wlang/dummy")
@@ -62,10 +62,10 @@
# hosting language. Evaluates it, looking for an enumerable. Iterates all its
# elements, instanciating #2 for each of them (the iterated value is set under
# name x in the scope). If #3 is present, it is instantiated between elements.
#
def self.enumeration(parser, offset)
- expression, reached = parser.parse(offset, "wlang/ruby")
+ expression, reached = parser.parse(offset, "wlang/hosted")
# decode 'wlang/hosted using each as x' expression
hash = U.expr(:expr,
["using", :var, false],
["as", :multi_as, false]).decode(expression, parser)
\ No newline at end of file