#include "scan/scan.h"
#include "core/text.h"
#include "base/panic.h"
#include "base/util.h"
#include "arena/arena.h"
#include "io/io.h"
Go to the source code of this file.
◆ scan_builtin()
create a builtin scanner
- Parameters
-
language | the language of the scanner |
arena | the allocator to use |
- Returns
- the builtin scanner
Definition at line 33 of file scan.c.
◆ scan_get()
get the compiled object from a scanner
- Parameters
-
scan | the scanner to get the user data of |
- Returns
- the user data of
scan
Definition at line 72 of file scan.c.
◆ scan_get_arena()
get the arena of a scanner
- Parameters
-
scan | the scanner to get the arena of |
- Returns
- the arena of
scan
Definition at line 113 of file scan.c.
◆ scan_get_context()
get the context of a scanner
- Parameters
-
scan | the scanner to get the context of |
- Returns
- the context of
scan
Definition at line 88 of file scan.c.
◆ scan_io()
create a scanner from an io source
- Parameters
-
language | the language of the source |
io | the io source to use |
arena | the allocator to use |
- Returns
- the created scanner
Definition at line 121 of file scan.c.
◆ scan_is_builtin()
check if a scanner is the builtin scanner
- Parameters
-
- Returns
- true if
scan
is the builtin scanner
Definition at line 41 of file scan.c.
◆ scan_language()
get the source language of a scanner
- Parameters
-
scan | the scanner to get the language of |
- Returns
- the language of
scan
Definition at line 48 of file scan.c.
◆ scan_path()
get the path of a scanner
- Parameters
-
scan | the scanner to get the path of |
- Returns
- the path of
scan
Definition at line 56 of file scan.c.
◆ scan_read()
◆ scan_set()
set the compiled object of a scanner
- Parameters
-
scan | the scanner to set the user data of |
value | the new user data |
Definition at line 64 of file scan.c.
◆ scan_set_context()
get the context of a scanner
- Parameters
-
scan | the scanner to get the context of |
value | the new context |
Definition at line 80 of file scan.c.
◆ scan_source()
get a text span of the scanners contents
- Parameters
-
scan | the scanner to get the text of |
- Returns
- the text of
scan
Definition at line 96 of file scan.c.