Package dtool.ast.expressions

Examples of dtool.ast.expressions.Expression


  public NodeResult<DeclarationStaticIf> parseDeclarationStaticIf(boolean isStatement) {
    ParseHelper parse = new ParseHelper(lookAheadElement());
    if(!tryConsume(DeeTokens.KW_STATIC, DeeTokens.KW_IF))
      return null;
   
    Expression exp = null;
    ConditionalBodyParseRule body = new ConditionalBodyParseRule();
   
    parsing: {
      if(parse.consumeRequired(DeeTokens.OPEN_PARENS).ruleBroken) break parsing;
      exp = parseAssignExpression_toMissing();
View Full Code Here


  public NodeResult<DeclarationStaticAssert> parseDeclarationStaticAssert() {
    ParseHelper parse = new ParseHelper(lookAheadElement());
    if(!tryConsume(DeeTokens.KW_STATIC, DeeTokens.KW_ASSERT))
      return null;
   
    Expression pred = null;
    Expression msg = null;
   
    if(parse.consumeExpected(DeeTokens.OPEN_PARENS)) {
     
      pred = parseAssignExpression_toMissing();
      if(tryConsume(DeeTokens.COMMA)) {
View Full Code Here

    boolean isConstrutor, Reference retType, ProtoDefSymbol defId) {
   
    ArrayView<IFunctionParameter> fnParams = null;
    ArrayView<TemplateParameter> tplParams = null;
    ArrayView<FunctionAttributes> fnAttributes = null;
    Expression tplConstraint = null;
    IFunctionBody fnBody = null;
   
    parsing: {
      DeeParser_RuleParameters firstParams = parseParameters(parse);
     
View Full Code Here

  public NodeResult<RefTypeof> parseRefTypeof() {
    if(!tryConsume(DeeTokens.KW_TYPEOF))
      return null;
    ParseHelper parse = new ParseHelper();
   
    Expression exp = null;
    parsing: {
      if(parse.consumeRequired(DeeTokens.OPEN_PARENS).ruleBroken) break parsing;
     
      if(tryConsume(DeeTokens.KW_RETURN)) {
        exp = conclude(srOf(lastLexElement(), new RefTypeof.ExpRefReturn()));
View Full Code Here

    consumeLookAhead(DeeTokens.OPEN_BRACKET);
   
    TypeOrExpResult argTypeOrExp = parseTypeOrExpression(InfixOpType.ASSIGN);
   
    if(lookAhead() == DeeTokens.DOUBLE_DOT) {
      Expression startIndex = nullExpToParseMissing(argTypeOrExp.toExpression().node);
      consumeLookAhead(DeeTokens.DOUBLE_DOT);
      Expression endIndex = parseAssignExpression_toMissing();
      parse.consumeRequired(DeeTokens.CLOSE_BRACKET);
      return parse.conclude(new RefSlice(leftRef, startIndex, endIndex));
    }
    parse.consumeRequired(DeeTokens.CLOSE_BRACKET);
   
View Full Code Here

  protected NodeListView<Expression> parseExpArgumentList(ParseHelper parse, boolean canBeEmpty,
    DeeTokens tokenLISTCLOSE) {
    SimpleListParseHelper<Expression> elementListParse = new SimpleListParseHelper<Expression>() {
      @Override
      protected Expression parseElement(boolean createMissing) {
        Expression arg = parseAssignExpression().node;
        return createMissing ? nullExpToParseMissing(arg) : arg;
      }
    };
    elementListParse.parseSimpleList(DeeTokens.COMMA, canBeEmpty, true);
   
View Full Code Here

  protected NodeResult<ExpSimpleLambda> parseSimpleLambdaLiteral_start() {
    ProtoDefSymbol defId = parseDefId();
    consumeLookAhead(DeeTokens.LAMBDA);
   
    ParseHelper parse = new ParseHelper(defId.getStartPos());
    Expression bodyExp = parse.checkResult(parseAssignExpression_toMissing(true, RULE_EXPRESSION));
   
    SimpleLambdaDefUnit lambdaDefId = conclude(defId.nameSourceRange, new SimpleLambdaDefUnit(defId));
    return parse.resultConclude(new ExpSimpleLambda(lambdaDefId, bodyExp));
  }
View Full Code Here

  public NodeResult<ExpAssert> parseAssertExpression() {
    if(tryConsume(DeeTokens.KW_ASSERT) == false)
      return null;
    ParseHelper parse = new ParseHelper();
   
    Expression exp = null;
    Expression msg = null;
    parsing: {
      if(parse.consumeRequired(DeeTokens.OPEN_PARENS).ruleBroken) break parsing;
      exp = parseAssignExpression_toMissing();
      if(tryConsume(DeeTokens.COMMA)) {
        msg = parseAssignExpression_toMissing();
View Full Code Here

  public NodeResult<ExpImportString> parseImportExpression() {
    if(tryConsume(DeeTokens.KW_IMPORT) == false)
      return null;
    ParseHelper parse = new ParseHelper();
   
    Expression expParentheses = parseExpressionAroundParentheses(parse, true, true);
    return parse.resultConclude(new ExpImportString(expParentheses));
  }
View Full Code Here

  public NodeResult<ExpMixinString> parseMixinExpression() {
    if(tryConsume(DeeTokens.KW_MIXIN) == false)
      return null;
    ParseHelper parse = new ParseHelper();
   
    Expression expParentheses = parseExpressionAroundParentheses(parse, true, true);
    return parse.resultConclude(new ExpMixinString(expParentheses));
  }
View Full Code Here

TOP

Related Classes of dtool.ast.expressions.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.