Explorar o código

代码提示优化

mxd %!s(int64=3) %!d(string=hai) anos
pai
achega
e9d354c79c
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  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() {