瀏覽代碼

代码提示优化

mxd 3 年之前
父節點
當前提交
e9d354c79c
共有 1 個文件被更改,包括 1 次插入4 次删除
  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() {