Package st.gravel.support.compiler.ast

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


      return newInstance;
    }

    public Expression parseExpression_(final String _aString) {
      final Parser _parser;
      final Expression _res;
      _parser = this.source_(_aString);
      _res = _parser.parseExpression();
      st.gravel.support.jvm.ObjectExtensions.assert_(this, _parser.atEnd());
      return _res;
    }
View Full Code Here


  public ClassNode defineClass_superclass_for_(final String _name, final String _superclassPath, final ClassNode _aClassNode) {
    return _aClassNode.withSuperclassPath_(_superclassPath);
  }

  public ClassNode defineSharedVariable_init_for_(final String _sharedName, final String _initializerSource, final ClassNode _aClassNode) {
    final Expression _initializer;
    _initializer = this.parseInitializerSource_(_initializerSource);
    return _aClassNode.withSharedVariable_(SharedDeclarationNode.factory.name_initializer_(_sharedName, _initializer));
  }
View Full Code Here

    }
    return ArrayLiteralNode.factory.elements_(_elements);
  }

  public Expression parseAssignmentOrExpression() {
    final Expression _rec;
    final int _start;
    _start = st.gravel.support.jvm.ReadStreamExtensions.position(_stream);
    _rec = this.parseExpression();
    this.eatWhitespace();
    if (st.gravel.support.jvm.ReadStreamExtensions.peekFor_(_stream, ':')) {
View Full Code Here

    }
    return ((Expression) this.setSourcePosition_node_(_start, _rec));
  }

  public AssignmentNode parseAssignment_(final Expression _aNode) {
    final Expression _value;
    st.gravel.support.jvm.ObjectExtensions.assert_(this, _aNode.isAssignable());
    _value = this.parseAssignmentOrExpression();
    return AssignmentNode.factory.variable_value_(((VariableNode) _aNode), _value);
  }
View Full Code Here

    this.eatWhitespace();
    return this;
  }

  public Expression parseBinaryMessageChain_receiver_(final String _aString, final Expression _rec) {
    final Expression _arg;
    final BinaryMessageNode _receiver;
    this.eatWhitespace();
    _arg = this.parseUnaryMessage();
    this.eatWhitespace();
    _receiver = BinaryMessageNode.factory.receiver_selector_argument_(_rec, _aString, _arg);
View Full Code Here

    });
    return BinaryMethodNode.factory.selector_argument_body_returnType_pragmas_protocol_(_aString, _argument, _body, _returnType, _pragmas[0], null);
  }

  public Expression parseBinaryOrUnaryMessage() {
    final Expression _receiver;
    _receiver = this.parseOperand();
    return this.parseBinaryOrUnaryMessage_(_receiver);
  }
View Full Code Here

    st.gravel.support.jvm.ReadStreamExtensions.next(_stream);
    return CharacterLiteralNode.factory.value_(st.gravel.support.jvm.ReadStreamExtensions.next(_stream));
  }

  public Expression parseExpression() {
    final Expression _receiver;
    final int _start;
    _start = st.gravel.support.jvm.ReadStreamExtensions.position(_stream);
    this.eatWhitespace();
    _receiver = this.parseOperand();
    return ((Expression) this.setSourcePosition_node_(_start, this.parseMessageChain_(((Expression) this.setSourcePosition_node_(_start, _receiver)))));
View Full Code Here

    });
    return KeywordMethodNode.factory.selector_arguments_body_returnType_pragmas_protocol_(_str.toString(), _arguments.toArray(new VariableDeclarationNode[_arguments.size()]), _body, _returnType, _pragmas[0], null);
  }

  public Expression parseMessageChain_(final Expression _receiver) {
    final Expression _exp;
    List<MessageNode> _messages;
    _exp = this.parseNoCascadeMessageChain_(_receiver);
    this.eatWhitespace();
    if (st.gravel.support.jvm.ReadStreamExtensions.peekFor_(_stream, ';')) {
      final MessageNode _baseMsg;
View Full Code Here

    }
    return this.parseNumber().negated();
  }

  public Expression parseNestedExpression() {
    Expression _exp;
    final int _start;
    final TypeNode _typeCast;
    _start = st.gravel.support.jvm.ReadStreamExtensions.position(_stream);
    st.gravel.support.jvm.ReadStreamExtensions.next(_stream);
    this.eatWhitespace();
View Full Code Here

    }
    throw ParseError.factory.basicNew();
  }

  public Expression parseUnaryMessage() {
    final Expression _receiver;
    _receiver = this.parseOperand();
    return this.parseUnaryMessage_(_receiver);
  }
View Full Code Here

TOP

Related Classes of st.gravel.support.compiler.ast.Expression

Copyright © 2018 www.massapicom. 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.