| 74 | } |
| 75 | |
| 76 | public void refAttr(Token templateToken, CommonTree id) { |
| 77 | String name = id.getText(); |
| 78 | if ( impl.formalArguments !=null && impl.formalArguments.get(name)!=null ) { |
| 79 | FormalArgument arg = impl.formalArguments.get(name); |
| 80 | int index = arg.index; |
| 81 | emit1(id, Bytecode.INSTR_LOAD_LOCAL, index); |
| 82 | } |
| 83 | else { |
| 84 | if ( Interpreter.predefinedAnonSubtemplateAttributes.contains(name) ) { |
| 85 | errMgr.compileTimeError(ErrorType.REF_TO_IMPLICIT_ATTRIBUTE_OUT_OF_SCOPE, |
| 86 | templateToken, |
| 87 | id.token); |
| 88 | emit(id, Bytecode.INSTR_NULL); |
| 89 | } |
| 90 | else { |
| 91 | emit1(id, Bytecode.INSTR_LOAD_ATTR, name); |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | public void setOption(CommonTree id) { |
| 97 | Interpreter.Option O = Compiler.supportedOptions.get(id.getText()); |