Skip to content

Commit

Permalink
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions spec/compiler/parser/parser_spec.cr
Original file line number Diff line number Diff line change
@@ -1689,6 +1689,8 @@ describe "Parser" do
it_parses "annotation Foo\n\nend", AnnotationDef.new("Foo".path)
it_parses "annotation Foo::Bar\n\nend", AnnotationDef.new(Path.new(["Foo", "Bar"]))

it_parses %(annotation Foo\nend\nrequire "bar"), [AnnotationDef.new("Foo".path), Require.new("bar")]

it "gets corrects of ~" do
node = Parser.parse("\n ~1")
loc = node.location.not_nil!
2 changes: 0 additions & 2 deletions src/compiler/crystal/syntax/parser.cr
Original file line number Diff line number Diff line change
@@ -1604,8 +1604,6 @@ module Crystal
end

def parse_annotation_def
@type_nest += 1

location = @token.location
doc = @token.doc

0 comments on commit df279d1

Please sign in to comment.