Skip to content

Commit

Permalink
Fix Error token in common Objective-C module (#1406)
Browse files Browse the repository at this point in the history
Certain objects that were extracted from the Objective-C lexer in #1378
needed to be prefaced with a `base` variable. This included the token
classes. This was not done for `Error`. This commit fixes that mistake.
  • Loading branch information
pocke authored and pyrmont committed Jan 25, 2020
1 parent 25da9ab commit 2472b40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/objective_c/common.rb
Expand Up @@ -44,7 +44,7 @@ def self.extended(base)
elsif base.at_builtins.include? m[1]
token base::Name::Builtin
else
token Error
token base::Error
end
end

Expand Down
3 changes: 3 additions & 0 deletions spec/visual/samples/objective_c
Expand Up @@ -173,3 +173,6 @@ ViewController *controller = [[ViewController alloc] initWithDocument:document c
builder.thumbnailBarMode = ThumbnailBarModeScrollable;
builder.pageLabelEnabled = NO;
}]];

// Invalid Objective-C keyword
@FOO

0 comments on commit 2472b40

Please sign in to comment.