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() {