pyvm: split op handlers into ops_core/ops_box/ops_ctrl; add ops_flow + intrinsic; delegate vm.py without behavior change
net-plugin: modularize constants (consts.rs) and sockets (sockets.rs); remove legacy commented socket code; fix unused imports mir: move instruction unit tests to tests/mir_instruction_unit.rs (file lean-up); no semantic changes runner/pyvm: ensure using pre-strip; misc docs updates Build: cargo build ok; legacy cfg warnings remain as before
This commit is contained in:
@ -196,6 +196,11 @@ impl NyashParser {
|
||||
let mut statements = Vec::new();
|
||||
let mut _statement_count = 0;
|
||||
|
||||
let allow_sc = std::env::var("NYASH_PARSER_ALLOW_SEMICOLON").ok().map(|v| {
|
||||
let lv = v.to_ascii_lowercase();
|
||||
lv == "1" || lv == "true" || lv == "on"
|
||||
}).unwrap_or(false);
|
||||
|
||||
while !self.is_at_end() {
|
||||
// EOF tokenはスキップ
|
||||
if matches!(self.current_token().token_type, TokenType::EOF) {
|
||||
@ -203,7 +208,9 @@ impl NyashParser {
|
||||
}
|
||||
|
||||
// NEWLINE tokenはスキップ(文の区切りとして使用)
|
||||
if matches!(self.current_token().token_type, TokenType::NEWLINE) {
|
||||
if matches!(self.current_token().token_type, TokenType::NEWLINE)
|
||||
|| (allow_sc && matches!(self.current_token().token_type, TokenType::SEMICOLON))
|
||||
{
|
||||
self.advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user