Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/StepfenShawn/Cantonese
/ functions
Functions
531 in github.com/StepfenShawn/Cantonese
⨍
Functions
531
◇
Types & classes
145
↓ 78 callers
Method
to_string
將標記流轉換為字符串
src/parser/token_tree.rs:147
↓ 77 callers
Method
push
添加一個標記到流尾部
src/parser/token_tree.rs:173
↓ 68 callers
Method
unwrap
(self)
py_cantonese/can_utils/option.py:15
↓ 43 callers
Function
cantonese_func_def
(func_name: str, func)
py_cantonese/can_libs/lib_gobals.py:7
↓ 40 callers
Method
build_expression
构建表达式
src/parser/ast_builder.rs:1004
↓ 38 callers
Method
get
(self, offset: int)
py_cantonese/web_core/can_web_parser.py:10
↓ 37 callers
Method
emit
输出代码
src/compiler/codegen.rs:37
↓ 35 callers
Method
emit
(self, s, stat)
py_cantonese/can_compiler/compiler.py:36
↓ 24 callers
Method
codegen_expr
(self, exp)
py_cantonese/can_compiler/compiler.py:41
↓ 22 callers
Method
len
获取标记流中的标记数量
src/parser/token_tree.rs:178
↓ 22 callers
Function
test_parse_file
辅助函数,测试文件是否可以被成功解析
tests/syntax_tests.rs:9
↓ 21 callers
Method
codegen_args
生成参数列表
src/compiler/codegen.rs:489
↓ 21 callers
Method
codegen_expression
生成表达式代码
src/compiler/codegen.rs:338
↓ 20 callers
Method
_codegen
(self, node)
py_cantonese/llvm_core/can_llvm_build.py:184
↓ 20 callers
Method
is_empty
检查标记流是否为空
src/parser/token_tree.rs:183
↓ 18 callers
Method
parse
解析源代码为AST
src/parser/ast_builder.rs:44
↓ 17 callers
Method
codegen_args
(self, args: list)
py_cantonese/can_compiler/compiler.py:143
↓ 17 callers
Function
span_to_py
将Rust的Span转换为Python字典
src/python/mod.rs:16
↓ 15 callers
Method
iter
获取所有元变量的名称和引用
src/macros/meta_var.rs:94
↓ 15 callers
Method
span
獲取語句嘅位置
src/ast/statement.rs:242
↓ 14 callers
Method
codegen_block
(self, blocks)
py_cantonese/can_compiler/compiler.py:375
↓ 14 callers
Function
get_str
(s: str)
py_cantonese/web_core/can_web_parser.py:117
↓ 14 callers
Method
skip
(self, offset)
py_cantonese/web_core/can_web_parser.py:30
↓ 13 callers
Method
codegen_block
生成代码块
src/compiler/codegen.rs:497
↓ 12 callers
Function
convert_expression
将dict表示的表达式转换为can_ast.Exp对象
py_cantonese/can_ast/can_ast_converter.py:59
↓ 11 callers
Method
build_block
构建代码块
src/parser/ast_builder.rs:1270
↓ 11 callers
Method
getIdName
(self, exp: can_ast.IdExp)
py_cantonese/llvm_core/can_llvm_build.py:488
↓ 9 callers
Method
collect
(self)
py_cantonese/can_libs/std/impl.py:40
↓ 9 callers
Function
convert_pos
将span字典转换为pos对象 目前简单返回Span对象,可以根据需要调整返回类型
py_cantonese/can_ast/can_ast_converter.py:49
↓ 9 callers
Method
map
(self, func)
py_cantonese/can_libs/std/impl.py:46
↓ 8 callers
Function
expression_to_py
将表达式转换为Python对象
src/python/mod.rs:24
↓ 7 callers
Method
check
(&self, size: usize)
py_cantonese/can_vm/src/machine.rs:28
↓ 7 callers
Method
into_iter
(self)
src/parser/token_tree.rs:258
↓ 6 callers
Method
_compile
(self, ast: list)
py_cantonese/llvm_core/can_llvm_build.py:177
↓ 6 callers
Method
check
(self, a, b)
py_cantonese/web_core/can_web_parser.py:25
↓ 6 callers
Method
get
获取元变量
src/macros/meta_var.rs:79
↓ 6 callers
Method
get_span
获取Pest Pair的Span
src/parser/ast_builder.rs:819
↓ 6 callers
Method
pop
(self)
py_cantonese/can_libs/std/impl.py:203
↓ 5 callers
Method
build_statement
构建语句
src/parser/ast_builder.rs:86
↓ 5 callers
Method
close
獲取結束分隔符
src/parser/token_tree.rs:60
↓ 5 callers
Method
is_some
(self)
py_cantonese/can_utils/option.py:9
↓ 5 callers
Method
unwrap_or
(self, default)
py_cantonese/can_utils/option.py:21
↓ 5 callers
Method
update
更新元变量的值
src/macros/meta_var.rs:43
↓ 4 callers
Method
build_postfix_expression
构建后缀表达式
src/parser/ast_builder.rs:1148
↓ 4 callers
Method
expand_block
展开代码块
src/macros/macro_expander.rs:240
↓ 4 callers
Method
expand_expression
展开表达式
src/macros/macro_expander.rs:253
↓ 4 callers
Method
match
(self, name: str)
py_cantonese/web_core/can_web_parser.py:15
↓ 3 callers
Method
build_token_stream
將表達式轉換為TokenStream
src/parser/macro_parser.rs:81
↓ 3 callers
Method
build_token_tree
构建TokenTree
src/parser/ast_builder.rs:1430
↓ 3 callers
Function
cantonese_run
( code: str, is_to_py: bool, file: str, REPL=False, get_py_code=False, use_rust=True )
py_cantonese/cantonese.py:118
↓ 3 callers
Method
expression_to_token_stream
将表达式转换为TokenStream
src/macros/macro_expander.rs:369
↓ 3 callers
Function
format_color
(code, type="Python")
py_cantonese/can_utils/show/helper.py:10
↓ 3 callers
Method
parse
(self)
py_cantonese/web_core/can_web_parser.py:40
↓ 3 callers
Method
run
(&mut self)
py_cantonese/can_vm/src/machine.rs:15
↓ 3 callers
Function
start_cantonese
啓動 `Cantonese` !!!
py_cantonese/cantonese.py:84
↓ 3 callers
Method
token_tree_to_expression
将TokenTree转换为表达式
src/parser/ast_builder.rs:1531
↓ 2 callers
Method
add
(self, right: CanObject<'a>)
py_cantonese/can_vm/src/can_object.rs:38
↓ 2 callers
Method
build_meta_variable
构建元变量表达式
src/parser/ast_builder.rs:965
↓ 2 callers
Method
build_primary
构建基础表达式单元
src/parser/ast_builder.rs:1142
↓ 2 callers
Method
build_token_stream
构建TokenStream表达式
src/parser/ast_builder.rs:913
↓ 2 callers
Method
build_unary_expression
构建一元表达式
src/parser/ast_builder.rs:1242
↓ 2 callers
Method
build_zero_value_matrix
(self, shape)
py_cantonese/can_libs/std/impl.py:224
↓ 2 callers
Function
cantonese_lib_init
()
py_cantonese/can_libs/std/impl.py:53
↓ 2 callers
Function
cantonese_web_run
(code: str, file_name: str, open_serv=True)
py_cantonese/web_core/can_web_parser.py:341
↓ 2 callers
Method
codegen_stat
(self, stat)
py_cantonese/can_compiler/compiler.py:170
↓ 2 callers
Method
codegen_statement
生成语句代码
src/compiler/codegen.rs:44
↓ 2 callers
Method
const
(val, width=None)
py_cantonese/llvm_core/can_llvm_build.py:25
↓ 2 callers
Function
convert_program
将dict列表表示的程序转换为can_ast.Stat列表
py_cantonese/can_ast/can_ast_converter.py:199
↓ 2 callers
Method
decode
(&mut self, instruction: &'a Opcode)
py_cantonese/can_vm/src/machine.rs:34
↓ 2 callers
Method
evaluate
(self, ast, optimize=True, llvmdump=False, endMainBlock=False)
py_cantonese/llvm_core/llvm_evaluator.py:16
↓ 2 callers
Function
expand_macros
宏展开函数 - 展开程序中的所有宏调用
src/macros/mod.rs:15
↓ 2 callers
Method
expand_statements
展开语句列表
src/macros/macro_expander.rs:161
↓ 2 callers
Method
inc_block
(self)
py_cantonese/llvm_core/can_llvm_build.py:101
↓ 2 callers
Method
is_meta_variable
判斷標記係唔係一個元變量(以@開頭)
src/parser/token_tree.rs:205
↓ 2 callers
Method
is_none
(self)
py_cantonese/can_utils/option.py:12
↓ 2 callers
Method
match_type
(self, name: str)
py_cantonese/web_core/can_web_parser.py:20
↓ 2 callers
Method
open
獲取開始分隔符
src/parser/token_tree.rs:50
↓ 2 callers
Function
parse_to_ast
(py: Python, code: &str)
src/python/mod.rs:323
↓ 2 callers
Function
position_to_py
将Rust的Position转换为Python字典
src/python/mod.rs:7
↓ 2 callers
Method
print_num
(self, num_format, num)
py_cantonese/llvm_core/can_llvm_build.py:115
↓ 2 callers
Method
run
(self, Nodes: list)
py_cantonese/web_core/can_web_parser.py:33
↓ 2 callers
Function
show_more
(data: object)
py_cantonese/can_utils/show/helper.py:25
↓ 2 callers
Method
state_mut
获取可变的匹配状态
src/macros/pat_matcher.rs:42
↓ 2 callers
Method
sub
(self, right: CanObject<'a>)
py_cantonese/can_vm/src/can_object.rs:54
↓ 2 callers
Function
text_objects
(text, font, color)
py_cantonese/can_libs/std/game/impl.py:124
↓ 2 callers
Method
to_py
(self)
py_cantonese/can_compiler/compiler.py:21
↓ 2 callers
Method
update_meta_var
更新元变量
src/macros/match_state.rs:25
↓ 2 callers
Method
visit_assign
(self, name: str, value: ir.Value or CantoneseCache)
py_cantonese/llvm_core/can_llvm_build.py:491
↓ 2 callers
Function
web_ast_new
(Node: list, type: str, ctx: list, with_style=True)
py_cantonese/web_core/can_web_parser.py:113
↓ 1 callers
Method
add_binding
添加绑定
src/macros/token_matcher.rs:83
↓ 1 callers
Method
add_builtin_func
(self)
py_cantonese/llvm_core/can_llvm_build.py:131
↓ 1 callers
Method
add_macro
添加宏定义
src/macros/macro_expander.rs:75
↓ 1 callers
Method
add_or_update
添加或更新元变量
src/macros/meta_var.rs:70
↓ 1 callers
Method
alloc_and_store
(builder: ir.IRBuilder, val, typ, name="")
py_cantonese/llvm_core/can_llvm_build.py:11
↓ 1 callers
Method
build_assert_statement
构建断言语句
src/parser/ast_builder.rs:655
↓ 1 callers
Method
build_assignment_block_statement
构建块赋值语句
src/parser/ast_builder.rs:169
↓ 1 callers
Method
build_assignment_statement
构建赋值语句
src/parser/ast_builder.rs:133
↓ 1 callers
Method
build_attribute_declaration
构建属性声明
src/parser/ast_builder.rs:436
↓ 1 callers
Method
build_body_meta_operation
构建宏体中的元操作
src/parser/ast_builder.rs:1394
↓ 1 callers
Method
build_body_meta_variable
构建宏体中的元变量
src/parser/ast_builder.rs:1342
next →
1–100 of 531, ranked by callers