Skip to content

Commit

Permalink
add include statement
Browse files Browse the repository at this point in the history
  • Loading branch information
C.A.P. Linssen committed Dec 2, 2024
1 parent 93a654a commit 03bb7da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pynestml/utils/model_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def parse_bit_operator(cls, string: str, verbose: bool = True) -> ASTArithmeticO
builder, parser = tokenize(string, verbose=verbose)
ret = builder.visit(parser.bitOperator())

@classmethod
def parse_block_with_variables(cls, string: str, verbose: bool = True) -> ASTBlockWithVariables:
(builder, parser) = tokenize(string, verbose=verbose)
ret = builder.visit(parser.blockWithVariables())
Expand Down Expand Up @@ -440,8 +441,9 @@ def parse_while_stmt(cls, string: str, verbose: bool = True) -> ASTWhileStmt:
def parse_stmts_body(cls, string: str, verbose: bool = True) -> ASTStmtsBody:
(builder, parser) = tokenize(string, verbose=verbose)
ret = builder.visit(parser.stmtsBody())
ret.accept(ASTHigherOrderVisitor(log_set_added_source_position))

return ret

@classmethod
def parse_included_file(cls, filename: str) -> Union[ASTNode, List[ASTNode]]:
with open(filename, 'r') as file:
Expand Down

0 comments on commit 03bb7da

Please sign in to comment.