Class: Brandish::Scanner
- Inherits:
-
Object
- Object
- Brandish::Scanner
- Includes:
- Yoga::Scanner
- Defined in:
- lib/brandish/scanner.rb
Overview
Scans the file for tokens. This is by default done incrementally, as it's requested by the parser or whatever consumer wants to use it. This is done to make sure that work that doesn't need to be done isn't.
Constant Summary collapse
- DEFAULT_OPTIONS =
The default options for the scanner.
{ tags: %i(< >).freeze }.freeze
Instance Method Summary collapse
-
#initialize(*args, **options) ⇒ Scanner
constructor
Initialize the scanner with the given source and file.
Constructor Details
#initialize(*args, **options) ⇒ Scanner
Initialize the scanner with the given source and file. If no file
is given, it defaults to <anon>
.
21 22 23 24 |
# File 'lib/brandish/scanner.rb', line 21 def initialize(*args, **) super(*args) @options = DEFAULT_OPTIONS.merge() end |