Goldie Homepage Documentation (v0.3) |
Exceptions
module goldie.exception This isn't actually a thrown exception. It's just used to represent a single lexing error. string file
int line
int pos
Filename, line number, and column number of the error.
string content
The actual piece of source that failed to lex.
readonly property string printableContent
Like content, but with non-printable characters removed.
string toString()
Ready-to-display string representation of the following format:
{file}({line}:{pos}): Syntax Error: '{printableContent}'
module goldie.exception Thrown upon any lexing or parsing error. The lexer and parser used when the error occurred. These can be inspected to obtain more information about the error. Under certain circumstances, either or both of these may be null, so make sure to check for null before using. string msg
Ready-to-display string representation of the error, including
filename (if available) and line and column numbers.
this(string msg)
Constructors.
module goldie.exception module goldie.exception Thrown when parsing finds a type of token in a place where the grammar doesn't allow it. For example, in a C-like language, the if in: var1 + if + var2.
Constructor.
module goldie.exception Thrown when parsing reaches the end of the source in a place where the grammar expects more tokens. For example, in a C-like language, a source consisting entirely of: void main() {.
Constructor.
module goldie.exception Thrown when an internal error is detected within Goldie. If you get one of these exceptions (the "msg" string will say something along the lines of "Internal Goldie Error:..."), please file a bug report. module goldie.exception Thrown when a problem occurs loading a CGT language file. IOException is part of the Tango library. this(string msg="", string lang="", Exception next=null)
Constructor.
module goldie.exception Thrown when Goldie tries to load a CGT language file, but cannot find the file. this(string lang, Exception next=null)
Constructor.
|