Added tree matching files.

parent 4b7e9fe6
from node import Node, Leaf
from parser import Parser
from external.graph_drawing.graph import generate_graph
from external.graph_drawing.line import generate_line
patterns = {
#'': L('')
}
def matches(exp, pattern):
pass
import unittest
from src.node import ExpressionNode as N, ExpressionLeaf as L
from src.match import patterns, matches
from src.parser import Parser
from tests.parser import ParserWrapper
class TestMatch(unittest.TestCase):
def setUp(self):
self.parser = ParserWrapper(Parser)
def test_constant(self):
pass
def assert_matches(self, exp, pattern_name):
self.assertTrue(matches(self.parser.run([exp]), patterns[pattern_name]))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment