Quellcode durchsuchen

代码提示优化

mxd vor 3 Jahren
Ursprung
Commit
e9d354c79c
1 geänderte Dateien mit 1 neuen und 4 gelöschten Zeilen
  1. 1 4
      magic-editor/src/console/src/scripts/parsing/parser.js

+ 1 - 4
magic-editor/src/console/src/scripts/parsing/parser.js

@@ -267,10 +267,7 @@ export class Parser {
     parseAsync() {
         let opening = this.stream.expect("async").getSpan();
         let expression = this.parseExpression();
-        if (expression instanceof MethodCall || expression instanceof FunctionCall || expression instanceof LambdaFunction) {
-            return new AsyncCall(new Span(opening, this.stream.getPrev().getSpan()), expression);
-        }
-        throw new ParseException("Expected MethodCall or FunctionCall or LambdaFunction", this.stream.getPrev().getSpan())
+        return new AsyncCall(new Span(opening, this.stream.getPrev().getSpan()), expression);
     }
 
     parseIfStatement() {