Beispiel #1
0
  /*
   * block
   *   : "{" (expressions)* "}"
   *   ;
   */
  void parseBlock() {
    PsiBuilder.Marker block = mark();

    myBuilder.enableNewlines();
    expect(LBRACE, "Expecting '{' to open a block");

    myExpressionParsing.parseStatements();

    expect(RBRACE, "Expecting '}");
    myBuilder.restoreNewlinesState();

    block.done(BLOCK);
  }
Beispiel #2
0
  void parseScript() {
    PsiBuilder.Marker fileMarker = mark();

    parsePreamble(false);

    PsiBuilder.Marker scriptMarker = mark();
    parseImportDirectives();

    PsiBuilder.Marker blockMarker = mark();

    myExpressionParsing.parseStatements();

    blockMarker.done(BLOCK);
    scriptMarker.done(SCRIPT);
    fileMarker.done(JET_FILE);
  }