Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amber-lang/heraclitus
/ functions
Functions
172 in github.com/amber-lang/heraclitus
⨍
Functions
172
◇
Types & classes
37
↓ 12 callers
Method
get
(&mut self, meta: &mut M, mut module: S, cb: fn(S) -> ExprType, id: ExprId)
tests/arith_modules/expr.rs:25
↓ 12 callers
Function
token
Matches one token with given word If token was matched successfully - the word it contained is returned. Otherwise detailed information is returned a
src/compiling/parser/pattern.rs:18
↓ 10 callers
Method
get_current_token
Return token under current index
src/compiling/parser/metadata.rs:94
↓ 10 callers
Method
parse
(&mut self, meta: &mut DefaultMetadata)
src/compiling/parser/syntax_module.rs:107
↓ 9 callers
Method
increment_index
Optionally set logic of incrementing the index number
src/compiling/parser/metadata.rs:89
↓ 8 callers
Method
get_index
(&self)
src/compiling/lexing/reader.rs:49
↓ 8 callers
Function
syntax
Parses syntax module If syntax module was parsed successfully - nothing is returned. Otherwise detailed information is returned about where this happ
src/compiling/parser/pattern.rs:71
↓ 8 callers
Method
tokenize
Tokenize source code Run lexer and tokenize code. The result is stored in the lexem attribute
src/compiling/lexing/lexer.rs:149
↓ 7 callers
Method
next
(&mut self)
src/compiling/lexing/reader.rs:111
↓ 7 callers
Method
word_push
Push letter to the word and set token start index
src/compiling/lexing/lexer.rs:139
↓ 6 callers
Method
get_path
Get the path to the file and return [unknown] if not supplied
src/compiling/failing/position_info.rs:82
↓ 6 callers
Method
get_position
(&self)
src/compiling/lexing/reader.rs:55
↓ 6 callers
Method
line
Render text with supplied coloring and end it with a newline
src/compiling/failing/logger.rs:62
↓ 5 callers
Method
add_word
(&self, lex_state: &mut LexState)
src/compiling/lexing/lexer.rs:77
↓ 5 callers
Method
get_code
(&self)
src/compiling/parser/metadata.rs:58
↓ 5 callers
Method
get_index
(&self)
src/compiling/parser/metadata.rs:42
↓ 5 callers
Method
get_region
(&self)
src/compiling/lexing/region_handler.rs:31
↓ 5 callers
Method
header
Render header of your information
src/compiling/failing/logger.rs:39
↓ 5 callers
Method
pattern_add_symbol
(&self, lex_state: &mut LexState, letter: char)
src/compiling/lexing/lexer.rs:110
↓ 4 callers
Method
generate_region_map
Generate a region for region handler This functionality is required if we want to reference other regions. It is not supposed to be used explicitly i
src/compiling_rules/region.rs:176
↓ 4 callers
Method
get_future
(&self, n: usize)
src/compiling/lexing/reader.rs:99
↓ 4 callers
Method
get_row_col_len
Returns last row, column and it's length
src/compiling/failing/logger.rs:103
↓ 4 callers
Method
path
Render location details with supplied coloring
src/compiling/failing/logger.rs:78
↓ 4 callers
Method
set_index
(&mut self, index: usize)
src/compiling/parser/metadata.rs:38
↓ 4 callers
Method
snippet
Render snippet of the code if the message is contextual to it
src/compiling/failing/logger.rs:189
↓ 3 callers
Method
pattern_begin
(&self, lex_state: &mut LexState, letter: char)
src/compiling/lexing/lexer.rs:125
↓ 3 callers
Method
set_debug
(&mut self, indent: usize)
src/compiling/parser/metadata.rs:50
↓ 3 callers
Function
token_by
Matches one token by defined function If token was matched successfully - the word it contained is returned. Otherwise detailed information is return
src/compiling/parser/pattern.rs:41
↓ 2 callers
Method
add_word_inclusively
(&self, lex_state: &mut LexState)
src/compiling/lexing/lexer.rs:93
↓ 2 callers
Method
comment
Add comment to an existing log
src/compiling/failing/message.rs:146
↓ 2 callers
Method
data
Attach additional data in form of a string
src/compiling/failing/position_info.rs:138
↓ 2 callers
Method
debug
Parser will display information about the call stack
src/compiling/compiler.rs:131
↓ 2 callers
Function
float
Match a float Matches a number that contains a floating point (has a dot in decimal notation) If desired - one can extend this implementation with ot
src/compiling/parser/preset.rs:114
↓ 2 callers
Method
format
(&self, formatter: &mut Formatter)
src/compiling/token.rs:19
↓ 2 callers
Method
get_debug
(&mut self)
src/compiling/parser/metadata.rs:46
↓ 2 callers
Method
get_history
(&self, n: usize)
src/compiling/lexing/reader.rs:68
↓ 2 callers
Method
get_pos_by_code
In case of EOF this function ensures you to return concrete position
src/compiling/failing/position_info.rs:173
↓ 2 callers
Method
get_slice
(&self, begin: usize, end: usize)
src/compiling/lexing/reader.rs:61
↓ 2 callers
Method
handle_compound
Determines what shall we do with detected compound
src/compiling/lexing/compound_handler.rs:46
↓ 2 callers
Method
handle_region
Check where we are in code and open / close some region if matched
src/compiling/lexing/region_handler.rs:49
↓ 2 callers
Function
indent
Matches indentation If indentation was matched successfully - the amount of spaces is returned. Otherwise detailed information is returned about wher
src/compiling/parser/pattern.rs:97
↓ 2 callers
Function
indent_with
Matches indentation with provided size If indentation was identified successfully return the std::cmp::Ordering depending on whether the amount of sp
src/compiling/parser/pattern.rs:119
↓ 2 callers
Function
integer
Match an integer Matches a positive or negative integer. If desired - one can extend this implementation with other chars.
src/compiling/parser/preset.rs:89
↓ 2 callers
Method
kind_to_color
(&self)
src/compiling/failing/logger.rs:30
↓ 2 callers
Method
load
Load code string
src/compiling/compiler.rs:116
↓ 2 callers
Method
match_region_by
( &self, reader: &Reader, cb: impl Fn(&Region) -> &String, candidates: &[Regio
src/compiling/lexing/region_handler.rs:94
↓ 2 callers
Method
match_region_by_begin
(&self, reader: &Reader)
src/compiling/lexing/region_handler.rs:112
↓ 2 callers
Method
match_region_by_end
(&self, reader: &Reader)
src/compiling/lexing/region_handler.rs:123
↓ 2 callers
Function
number
Match a number Matches a number that is an integer or float If desired - one can extend this implementation with other chars.
src/compiling/parser/preset.rs:145
↓ 2 callers
Method
parse_debug
Do not implement this function as this is a predefined function for debugging
src/compiling/parser/syntax_module.rs:70
↓ 2 callers
Method
pattern_end
(&self, lex_state: &mut LexState, letter: char)
src/compiling/lexing/lexer.rs:133
↓ 2 callers
Method
show
Shows (renders) the message while giving the ownership to this object away
src/compiling/failing/message.rs:153
↓ 2 callers
Method
snippet_from_code
Render snippet of the code based on the code data
src/compiling/failing/logger.rs:203
↓ 2 callers
Method
updated_pos
(mut self, meta: &impl Metadata)
src/compiling/failing/position_info.rs:75
↓ 1 callers
Method
add_indent
(&self, lex_state: &mut LexState)
src/compiling/lexing/lexer.rs:57
↓ 1 callers
Method
exclude
(&mut self, target: ExprId)
tests/arith_modules/expr.rs:22
↓ 1 callers
Method
get
(&mut self, meta: &mut M, mut module: S, cb: impl Fn(S) -> ExprType)
tests/cobra_modules/expr.rs:14
↓ 1 callers
Method
get_highlighted_part
Returns chopped string where first and third part are supposed to be left as is but the second one is supposed to be highlighted
src/compiling/failing/logger.rs:126
↓ 1 callers
Method
get_history_or_future
(&self, n: usize, mode: &ReadMode)
src/compiling/lexing/reader.rs:89
↓ 1 callers
Method
get_max_pad_size
Get max padding size (for line numbering)
src/compiling/failing/logger.rs:114
↓ 1 callers
Method
get_pos_by_file
In case of EOF this function ensures you to return concrete position
src/compiling/failing/position_info.rs:165
↓ 1 callers
Method
get_pos_by_file_or_code
Get position of the error by either path or code
src/compiling/failing/position_info.rs:144
↓ 1 callers
Method
get_region_by
(&self, cb: impl Fn(&Region) -> bool, candidates: &[Region])
src/compiling/lexing/region_handler.rs:139
↓ 1 callers
Method
get_snippet_row
Return requested row with appropriate coloring
src/compiling/failing/logger.rs:146
↓ 1 callers
Method
get_token_at
(&self, index: usize)
src/compiling/parser/metadata.rs:34
↓ 1 callers
Method
get_trace
Get traceback
src/compiling/parser/metadata.rs:85
↓ 1 callers
Method
is_region_closed
(&self, reader: &Reader)
src/compiling/lexing/region_handler.rs:38
↓ 1 callers
Method
message
Add message to an existing log
src/compiling/failing/message.rs:140
↓ 1 callers
Method
next_letter
(&mut self)
src/compiling/lexing/reader.rs:28
↓ 1 callers
Function
numeric
Match numeric word Matches a token of which word is a string of digits. If desired - one can extend this implementation with other chars.
src/compiling/parser/preset.rs:73
↓ 1 callers
Method
padded_line
Render padded text with a newline, applying the supplied coloring, and end it with another newline
src/compiling/failing/logger.rs:70
↓ 1 callers
Method
parse_module
(&mut self, meta: &mut DefaultMetadata, module: ExprType)
tests/arith_modules/expr.rs:53
↓ 1 callers
Method
parse_module
(&mut self, meta: &mut DefaultMetadata, module: ExprType)
tests/cobra_modules/expr.rs:27
↓ 1 callers
Method
peek
(&self)
src/compiling/lexing/reader.rs:78
↓ 1 callers
Method
set_indent_size
(&mut self, size: usize)
tests/cobra_modules/block.rs:11
↓ 1 callers
Method
tokenize
Run just lexer
src/compiling/compiler.rs:126
↓ 1 callers
Method
use_indents
Set the language to use indentations
src/compiling/compiler.rs:96
↓ 1 callers
Function
variable
Match variable name Matches one token with a word that would be considered as a variable name. If desired - one can extend this implementation with o
src/compiling/parser/preset.rs:9
Function
alphabetic
Match alphabetic word Matches one token with a word that consists of letters only. If desired - one can extend this implementation with other chars.
src/compiling/parser/preset.rs:41
Function
alphanumeric
Match alphanumeric word Matches one token with a word that consists of letters or numbers only. If desired - one can extend this implementation with
src/compiling/parser/preset.rs:57
Function
arith
()
tests/arith.rs:5
Method
at_eof
Create a new error at the end of file
src/compiling/failing/position_info.rs:53
Method
at_pos
Create a new error at given position
src/compiling/failing/position_info.rs:65
Function
cobra
()
tests/cobra.rs:5
Method
compile
Bulk run lexer and parser (used for testing purposes)
src/compiling/compiler.rs:136
Function
correct_history_and_future
()
src/compiling/lexing/reader.rs:163
Function
display_token
()
src/compiling/token.rs:52
Method
fmt
(&self, formatter: &mut Formatter)
src/compiling/token.rs:38
Method
from_between_positions
Create an error at position between two PositionInfo objects This function is used to create an error between two positions which can be used to expr
src/compiling/failing/position_info.rs:126
Method
from_between_tokens
Create an error at position between two tokens This function is used to create an error between two tokens which can be used to express an error in a
src/compiling/failing/position_info.rs:111
Method
from_metadata
Create an error at current position of current token by metadata This function can become handy when parsing the AST. This takes the current index st
src/compiling/failing/position_info.rs:92
Method
from_token
Create an error at position of the provided token This function gives you ability to store tokens and error once you finished parsing the entire expr
src/compiling/failing/position_info.rs:100
Method
generate_compounds
Generates a tree where the key is the left item of the pair and values are all the right items of the pair
src/compiling/lexing/compound_handler.rs:34
Method
generate_region_rec
(this: Region, mut map: RegionMap)
src/compiling_rules/region.rs:177
Method
get_full_trace
(meta: &impl Metadata, position: PositionInfo)
src/compiling/failing/message.rs:172
Method
get_path
(&self)
src/compiling/parser/metadata.rs:54
Function
handle_region
()
src/compiling/lexing/region_handler.rs:194
Function
indent_test
()
src/compiling/parser/pattern.rs:140
Function
indent_with_test
()
src/compiling/parser/pattern.rs:149
Function
index_position
()
src/compiling/lexing/reader.rs:144
next →
1–100 of 172, ranked by callers