Skip to content

Commit

Permalink
Use SemanticResult
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Dec 12, 2023
1 parent 3f1212d commit 3310a85
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ def semantic(node : ASTNode, *, warnings = nil, wants_doc = false, flags = nil)
SemanticResult.new(program, node)
end

record TopLevelSemanticResult,
program : Program,
node : ASTNode

def top_level_semantic(code : String, wants_doc = false, inject_primitives = false)
node = parse(code, wants_doc: wants_doc)
node = inject_primitives(node) if inject_primitives
Expand All @@ -94,7 +90,7 @@ def top_level_semantic(node : ASTNode, wants_doc = false)
program.wants_doc = wants_doc
node = program.normalize node
node, _ = program.top_level_semantic node
TopLevelSemanticResult.new(program, node)
SemanticResult.new(program, node)
end

def assert_normalize(from, to, flags = nil, *, file = __FILE__, line = __LINE__)
Expand Down

0 comments on commit 3310a85

Please sign in to comment.