GLib.Scanner
const GLib = imports.gi.GLib; let scanner = new GLib.Scanner({ max_parse_errors: value parse_errors: value token: value line: value position: value next_token: value next_line: value next_position: value });
The data structure representing a lexical scanner.
You should set @input_name after creating the scanner, since it is used by the default message handler when displaying warnings and errors. If you are scanning a file, the filename would be a good choice.
The @user_data and @max_parse_errors fields are not used. If you need to associate extra data with the scanner you can place them here.
If you want to use your own message handler you can set the @msg_handler field. The type of the message handler function is declared by GLib.ScannerMsgFunc.
Methods
- GLib.Scanner.prototype.cur_line
- GLib.Scanner.prototype.cur_position
- GLib.Scanner.prototype.cur_token
- GLib.Scanner.prototype.destroy
- GLib.Scanner.prototype.eof
- GLib.Scanner.prototype.get_next_token
- GLib.Scanner.prototype.input_file
- GLib.Scanner.prototype.input_text
- GLib.Scanner.prototype.peek_next_token
- GLib.Scanner.prototype.scope_add_symbol
- GLib.Scanner.prototype.scope_remove_symbol
- GLib.Scanner.prototype.set_scope
- GLib.Scanner.prototype.sync_file_offset
- GLib.Scanner.prototype.unexp_token