js/jasminesnake/ast/nodes/programs.py

16 lines
366 B
Python
Raw Normal View History

2020-04-26 23:10:26 +10:00
"""The module of Program AST node."""
from typing import List
from . import *
from .statements import Statement, Directive
class Program(Node):
"""A complete program source tree."""
def __init__(
self, loc: Optional[SourceLocation], body: List[Union[Directive, Statement]]
):
super().__init__("Program", loc)
self.body = body