1 30 package org.jruby.parser; 31 32 import org.jruby.runtime.DynamicScope; 33 34 public class RubyParserConfiguration { 35 private DynamicScope existingScope = null; 36 private boolean asBlock = false; 37 38 44 public void parseAsBlock(DynamicScope existingScope) { 45 this.asBlock = true; 46 this.existingScope = existingScope; 47 } 48 49 54 public DynamicScope getScope() { 55 if (asBlock) { 56 return existingScope; 57 } 58 59 return new DynamicScope(new LocalStaticScope(null), existingScope); 64 } 65 } 66 | Popular Tags |