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:
@ -52,8 +52,18 @@ pub trait ParserUtils {
|
||||
|
||||
/// NEWLINEトークンをスキップ
|
||||
fn skip_newlines(&mut self) {
|
||||
while matches!(self.current_token().token_type, TokenType::NEWLINE) && !self.is_at_end() {
|
||||
self.advance();
|
||||
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);
|
||||
loop {
|
||||
let is_nl = matches!(self.current_token().token_type, TokenType::NEWLINE);
|
||||
let is_sc = allow_sc && matches!(self.current_token().token_type, TokenType::SEMICOLON);
|
||||
if (is_nl || is_sc) && !self.is_at_end() {
|
||||
self.advance();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user