:right-sidebar: True ScannerConfig =================================================================== .. currentmodule:: gi.repository.GLib .. class:: ScannerConfig(*args, **kwargs) :no-contents-entry: Specifies the :obj:`~gi.repository.GLib.Scanner` parser configuration. Most settings can be changed during the parsing phase and will affect the lexical parsing of the next unpeeked token. Fields ------ .. rst-class:: interim-class .. class:: ScannerConfig :no-index: .. attribute:: case_sensitive Specifies if symbols are case sensitive (the default is :const:`False`). .. attribute:: char_2_token Specifies if characters are reported by setting ``token = ch`` or as :const:`~gi.repository.GLib.TokenType.CHAR` (the default is :const:`True`). .. attribute:: cpair_comment_single Specifies the characters at the start and end of single-line comments. The default is "#\n" which means that single-line comments start with a '#' and continue until a '\n' (end of line). .. attribute:: cset_identifier_first Specifies the characters which can start identifiers (the default is :const:`~gi.repository.GLib.CSET_A_2_Z`, "_", and :const:`~gi.repository.GLib.CSET_A_2_Z`). .. attribute:: cset_identifier_nth Specifies the characters which can be used in identifiers, after the first character (the default is :const:`~gi.repository.GLib.CSET_A_2_Z`, "_0123456789", :const:`~gi.repository.GLib.CSET_A_2_Z`, %G_CSET_LATINS, %G_CSET_LATINC). .. attribute:: cset_skip_characters Specifies which characters should be skipped by the scanner (the default is the whitespace characters: space, tab, carriage-return and line-feed). .. attribute:: identifier_2_string Specifies if identifiers are reported as strings (the default is :const:`False`). .. attribute:: int_2_float Specifies if all numbers are reported as :const:`~gi.repository.GLib.TokenType.FLOAT` (the default is :const:`False`). .. attribute:: numbers_2_int Specifies if binary, octal and hexadecimal numbers are reported as :const:`~gi.repository.GLib.TokenType.INT` (the default is :const:`True`). .. attribute:: padding_dummy .. attribute:: scan_binary Specifies if binary numbers are recognized (the default is :const:`False`). .. attribute:: scan_comment_multi Specifies if multi-line comments are recognized (the default is :const:`True`). .. attribute:: scan_float Specifies if floating point numbers are recognized (the default is :const:`True`). .. attribute:: scan_hex Specifies if hexadecimal numbers are recognized (the default is :const:`True`). .. attribute:: scan_hex_dollar Specifies if '$' is recognized as a prefix for hexadecimal numbers (the default is :const:`False`). .. attribute:: scan_identifier Specifies if identifiers are recognized (the default is :const:`True`). .. attribute:: scan_identifier_1char Specifies if single-character identifiers are recognized (the default is :const:`False`). .. attribute:: scan_identifier_NULL The type of the None singleton. .. attribute:: scan_octal Specifies if octal numbers are recognized (the default is :const:`True`). .. attribute:: scan_string_dq Specifies if strings can be enclosed in double quotes (the default is :const:`True`). .. attribute:: scan_string_sq Specifies if strings can be enclosed in single quotes (the default is :const:`True`). .. attribute:: scan_symbols Specifies if symbols are recognized (the default is :const:`True`). .. attribute:: scope_0_fallback Specifies if a symbol is searched for in the default scope in addition to the current scope (the default is :const:`False`). .. attribute:: skip_comment_multi Specifies if multi-line comments are skipped and not returned as tokens (the default is :const:`True`). .. attribute:: skip_comment_single Specifies if single-line comments are skipped and not returned as tokens (the default is :const:`True`). .. attribute:: store_int64 Use value.v_int64 rather than v_int .. attribute:: symbol_2_token Specifies if symbols are reported by setting ``token = v_symbol`` or as :const:`~gi.repository.GLib.TokenType.SYMBOL` (the default is :const:`False`).