-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #304 from yui-knk/better_error_message
Better error message
- Loading branch information
Showing
12 changed files
with
420 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
module Lrama | ||
class Lexer | ||
class Location | ||
attr_reader grammar_file_path: String | ||
attr_reader first_line: Integer | ||
attr_reader first_column: Integer | ||
attr_reader last_line: Integer | ||
attr_reader last_column: Integer | ||
|
||
def initialize: (first_line: Integer, first_column: Integer, last_line: Integer, last_column: Integer) -> void | ||
def initialize: (grammar_file_path: String, first_line: Integer, first_column: Integer, last_line: Integer, last_column: Integer) -> void | ||
|
||
def ==: (Location other) -> bool | ||
def partial_location: (Integer, Integer) -> Location | ||
def generate_error_message: (String) -> String | ||
def line_with_carrets: () -> String | ||
|
||
private | ||
|
||
def blanks: () -> String | ||
def carrets: () -> String | ||
def text: () -> String | ||
def _text: () -> Array[String] | ||
end | ||
end | ||
end |
Oops, something went wrong.