# Path: bigrig/parser/ast.py
# class ExpressionStatement(Statement):
#     abstract = False
#     fields = ('expression',)
# 
# class StringLiteral(Literal):
#     abstract = False
#     fields = ('value',)
# 
# Path: bigrig/parser/visitor.py
# class NodeVisitor(object):
#     """
#     Walks the abstract syntax tree, calling the visitor function for every
#     subtree found.
#     """
#     def __init__(self):
#         self._visitor_cache = {}
# 
#     def get_visitor(self, node):
#         node_class = node.__class__
#         visitor = self._visitor_cache.get(node_class)
#         if visitor is None:
#             method = 'visit_%s' % node_class.__name__
#             visitor = getattr(self, method, self.generic_visit)
#             self._visitor_cache[node_class] = visitor
#         return visitor
# 
#     def visit(self, node):
#         visitor = self.get_visitor(node)
#         return visitor(node)
# 
#     def generic_visit(self, node):
#         if isinstance(node, Node):
#             self.visit_node(node)
# 
#     def visit_node(self, node):
#         for child in node.iter_children():
#             self.visit(child)
# 
#     def visit_list(self, node):
#         for element in node:
#             self.visit(element)


from ..parser.ast import ExpressionStatement, StringLiteral
from ..parser.visitor import NodeVisitor


def code_is_strict(code):
    # 14.1
    if not code:
        return False
    strict = False
    for node in code:
        if not isinstance(node, ExpressionStatement):
            break

# Path: bigrig/parser/ast.py
# class ExpressionStatement(Statement):
#     abstract = False
#     fields = ('expression',)
# 
# class StringLiteral(Literal):
#     abstract = False
#     fields = ('value',)
# 
# Path: bigrig/parser/visitor.py
# class NodeVisitor(object):
#     """
#     Walks the abstract syntax tree, calling the visitor function for every
#     subtree found.
#     """
#     def __init__(self):
#         self._visitor_cache = {}
# 
#     def get_visitor(self, node):
#         node_class = node.__class__
#         visitor = self._visitor_cache.get(node_class)
#         if visitor is None:
#             method = 'visit_%s' % node_class.__name__
#             visitor = getattr(self, method, self.generic_visit)
#             self._visitor_cache[node_class] = visitor
#         return visitor
# 
#     def visit(self, node):
#         visitor = self.get_visitor(node)
#         return visitor(node)
# 
#     def generic_visit(self, node):
#         if isinstance(node, Node):
#             self.visit_node(node)
# 
#     def visit_node(self, node):
#         for child in node.iter_children():
#             self.visit(child)
# 
#     def visit_list(self, node):
#         for element in node:
#             self.visit(element)


# Path: bigrig/interpreter/ast_utils.py
from ..parser.ast import ExpressionStatement, StringLiteral
from ..parser.visitor import NodeVisitor



def code_is_strict(code):
    # 14.1
    if not code:
        return False
    strict = False
    for node in code:
        if not isinstance(node, ExpressionStatement):
            break

        elif not isinstance(node.expression, StringLiteral):