Examples of VariableDeclarationNode


Examples of br.com.caelum.vraptor.panettone.parser.ast.VariableDeclarationNode

    if(chunk.getText().indexOf("=")>-1) {
      value = chunk.getText().substring(chunk.getText().indexOf("=")+1).trim();
      value = value.substring(0, value.length()-1);
    }
   
    return new VariableDeclarationNode(type, name, value, chunk.getBeginLine());
  }
View Full Code Here

Examples of br.com.caelum.vraptor.panettone.parser.ast.VariableDeclarationNode

    if(chunk.getText().indexOf("=")>-1) {
      value = chunk.getText().substring(chunk.getText().indexOf("=")+1).trim();
      value = value.substring(0, value.length()-1);
    }
   
    return new VariableDeclarationNode(type, name, value);
  }
View Full Code Here

Examples of org.adjective.syntactic.parser.node.VariableDeclarationNode

        }, null);
    }

    private void markFinal(final String var)
    {
        final VariableDeclarationNode node = _vars.get(var);
        if (node == null)
        {
            return;
        }
        _toMarkFinal.add(new Pair<VariableDeclarationNode, String>(node, var));
View Full Code Here

Examples of org.adjective.syntactic.parser.node.VariableDeclarationNode

    public VariableDeclarationNode get(String name)
    {
        for (int i = _stack.size() - 1; i >= 0; i--)
        {
            final VariableDeclarationNode var = _stack.get(i).get(name);
            if (var != null)
            {
                return var;
            }
        }
View Full Code Here

Examples of st.gravel.support.compiler.ast.VariableDeclarationNode

      JVMMethodCompiler.this.produceVarRead_("self");
      JVMMethodCompiler.this.ensureCast_(_staticSignature[0].arguments()[0]);
    }
    for (int _temp1 = 0; _temp1 < _aMethodNode.arguments().length; _temp1++) {
      final int _i = _temp1 + 1;
      final VariableDeclarationNode _each = _aMethodNode.arguments()[_temp1];
      JVMMethodCompiler.this.produceVarRead_(_each.name());
      JVMMethodCompiler.this.ensureCast_(_staticSignature[0].arguments()[(_i + (_selfOffset[0])) - 1]);
    }
    this.emit_(_invoke);
    if (_staticSignature[0].returnType().isVoidType()) {
      JVMMethodCompiler.this.produceVarRead_("self");
View Full Code Here

Examples of st.gravel.support.compiler.ast.VariableDeclarationNode

  public KeywordMethodNode sourceOn_(final StringBuilder _aStream) {
    final String[] _keywords;
    _keywords = st.gravel.support.jvm.StringExtensions.tokensBasedOn_(_selector, ':');
    for (int _i = 1; _i <= _arguments.length; _i++) {
      final String _keyword;
      final VariableDeclarationNode _argument;
      _keyword = _keywords[_i - 1];
      _argument = _arguments[_i - 1];
      if (!st.gravel.support.jvm.IntegerExtensions.equals_(_i, 1)) {
        _aStream.append(' ');
      }
      _aStream.append(_keyword);
      _aStream.append(':');
      _aStream.append(' ');
      _argument.sourceOn_(_aStream);
    }
    this.returnTypeAndBodySourceOn_(_aStream);
    return this;
  }
View Full Code Here

Examples of st.gravel.support.compiler.ast.VariableDeclarationNode

    return this.copy();
  }

  @Override
  public Expression visitAssignmentNode_(final AssignmentNode _anObject) {
    final VariableDeclarationNode _instVar;
    if (this.includesLocalName_(_anObject.variable().name())) {
      return LocalWriteNode.factory.name_value_(_anObject.variable().name(), ((Expression) VariableAccessToFieldAccessConverter.this.visit_(_anObject.value())));
    }
    _instVar = this.instVarAt_(_anObject.variable().name());
    if (_instVar != null) {
      return FieldWriteNode.factory.owner_field_type_value_(_owner, _instVar.name(), _instVar.type(), ((Expression) VariableAccessToFieldAccessConverter.this.visit_(_anObject.value())));
    }
    return GlobalWriteNode.factory.namespace_name_value_(_namespace, _anObject.variable().name(), ((Expression) this.visit_(_anObject.value())));
  }
View Full Code Here

Examples of st.gravel.support.compiler.ast.VariableDeclarationNode

    return GlobalWriteNode.factory.namespace_name_value_(_namespace, _anObject.variable().name(), ((Expression) this.visit_(_anObject.value())));
  }

  @Override
  public Expression visitVariableNode_(final VariableNode _anObject) {
    final VariableDeclarationNode _instVar;
    if (st.gravel.support.jvm.StringExtensions.equals_(_anObject.name(), "self")) {
      return SelfNode.factory.basicNew();
    }
    if (st.gravel.support.jvm.StringExtensions.equals_(_anObject.name(), "super")) {
      return SuperNode.factory.reference_(_ownerReference);
    }
    if (this.includesLocalName_(_anObject.name())) {
      return LocalReadNode.factory.name_(_anObject.name());
    }
    _instVar = this.instVarAt_(_anObject.name());
    if (_instVar != null) {
      return FieldReadNode.factory.owner_field_type_(_owner, _instVar.name(), _instVar.type());
    }
    return GlobalReadNode.factory.namespace_name_(_namespace, _anObject.name());
  }
View Full Code Here

Examples of st.gravel.support.compiler.ast.VariableDeclarationNode

    }
    return _str.toString();
  }

  public BinaryMethodNode parseBinaryMethod_(final String _aString) {
    final VariableDeclarationNode _argument;
    final SequenceNode _body;
    final TypeNode _returnType;
    final PragmaNode[][] _pragmas;
    _pragmas = new PragmaNode[1][];
    this.eatWhitespace();
View Full Code Here

Examples of st.gravel.support.compiler.ast.VariableDeclarationNode

    _temporaries = new List[1];
    _oldExtraTemps = new List[1];
    _temporaries[0] = new java.util.ArrayList();
    _statements[0] = new java.util.ArrayList();
    for (final VariableDeclarationNode _each : _anObject.temporaries()) {
      final VariableDeclarationNode _newTemp;
      _newTemp = ((VariableDeclarationNode) LiteralSendInliner.this.visit_(_each));
      _temporaries[0].add(_newTemp);
    }
    for (final Statement _each : _anObject.statements()) {
      final Statement _res;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.