MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / emit_build_string

Method emit_build_string

aiscript-vm/src/compiler/codegen.rs:925–939  ·  view source on GitHub ↗
(&mut self, count: usize)

Source from the content-addressed store, hash-verified

923 }
924
925 fn emit_build_string(&mut self, count: usize) {
926 // Enforce the limit of 255 parts in an f-string
927 if count > u8::MAX as usize {
928 self.error(&format!(
929 "F-string with too many parts: {}. Maximum supported is {}.",
930 count,
931 u8::MAX
932 ));
933 // Emit a BuildString with max parts to avoid further errors
934 self.emit(OpCode::BuildString(u8::MAX));
935 } else {
936 // Simple case - just emit one BuildString opcode
937 self.emit(OpCode::BuildString(count as u8));
938 }
939 }
940
941 fn generate_keyword_args(
942 &mut self,

Callers 1

generate_exprMethod · 0.80

Calls 2

emitMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected