janus.language.alc.alc#
Attributes#
Classes#
A class that combines code blocks into ALC files. |
|
A class for splitting ALC code into functional blocks to prompt |
|
A class for splitting ALC listing code into functional blocks to |
Module Contents#
- janus.language.alc.alc.log#
- class janus.language.alc.alc.AlcCombiner#
Bases:
janus.language.combine.Combiner
A class that combines code blocks into ALC files.
Initialize a AlcCombiner instance.
- class janus.language.alc.alc.AlcSplitter(model=None, max_tokens=4096, protected_node_types=(), prune_node_types=(), prune_unprotected=False)#
Bases:
janus.language.treesitter.TreeSitterSplitter
A class for splitting ALC code into functional blocks to prompt with for transcoding.
Initialize a AlcSplitter instance.
- class janus.language.alc.alc.AlcListingSplitter(model=None, max_tokens=4096, protected_node_types=(), prune_node_types=(), prune_unprotected=False)#
Bases:
AlcSplitter
A class for splitting ALC listing code into functional blocks to prompt with for transcoding.
Initialize a AlcSplitter instance.
- Parameters:
- split_string(code, name)#
Split the given code into functional code blocks.
- Parameters:
- Returns:
A CodeBlock made up of nested `CodeBlock`s.
- Return type:
- preproccess_assembly(code)#
Remove non-essential lines from an assembly snippet
- get_active_usings(code)#
Look for ‘active usings’ in the ALC listing header
- strip_header_and_left(lines)#
Remove the header and the left panel from the assembly sample
- strip_addresses(lines)#
Strip the addresses which run down the right side of the assembly snippet