Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Pos Position Expected string Found string // contains filtered or unexported fields }
Error is the error type returned for all scanning/lexing/parsing related errors.
func (*Error) SetOccured ¶
SetOccured sets the file and the line number at which the error was raised (through runtime.Caller).
type Meta ¶
type Meta struct { // Pos is the source position. Pos Position // LastPos is the last source position. // Currently it is set when the parsed element type is // syntax, package, comment, import, option, message, enum, oneof, rpc or service. LastPos Position }
Meta represents a meta information about the parsed element.
type Position ¶
type Position struct { // Filename is a name of file, if any Filename string // Offset is a byte offset, starting at 0 Offset int // Line is a line number, starting at 1 Line int // Column is a column number, starting at 1 (character count per line) Column int }
Position represents a source position.
Click to show internal directories.
Click to hide internal directories.