Phase 30.1 & 73: Stage-3 features env and JoinIR flag cleanup
This commit is contained in:
@ -157,8 +157,8 @@ impl NyashTokenizer {
|
||||
start_column,
|
||||
))
|
||||
}
|
||||
// Stage‑3: シングルクォート文字列(オプトイン)
|
||||
Some('\'') if crate::config::env::parser_stage3() => {
|
||||
// Stage‑3: シングルクォート文字列(オプトイン、現行デフォルトON)
|
||||
Some('\'') if crate::config::env::parser_stage3_enabled() => {
|
||||
let string_value = self.read_single_quoted_string()?;
|
||||
Ok(Token::new(
|
||||
TokenType::STRING(string_value),
|
||||
|
||||
@ -66,8 +66,8 @@ impl NyashTokenizer {
|
||||
_ => TokenType::IDENTIFIER(identifier.clone()),
|
||||
};
|
||||
|
||||
// Stage-3 gate: LOCAL/FLOW/TRY/CATCH/THROW require NYASH_PARSER_STAGE3=1
|
||||
let stage3_enabled = crate::config::env::parser_stage3();
|
||||
// Stage-3 gate: LOCAL/FLOW/TRY/CATCH/THROW require Stage-3 parser (default ON)
|
||||
let stage3_enabled = crate::config::env::parser_stage3_enabled();
|
||||
if !stage3_enabled {
|
||||
let is_stage3 = matches!(
|
||||
tok,
|
||||
@ -83,7 +83,7 @@ impl NyashTokenizer {
|
||||
if is_stage3 {
|
||||
if std::env::var("NYASH_TOK_TRACE").ok().as_deref() == Some("1") {
|
||||
eprintln!(
|
||||
"[tok-stage3] Degrading {:?} to IDENTIFIER (NYASH_PARSER_STAGE3={})",
|
||||
"[tok-stage3] Degrading {:?} to IDENTIFIER (stage3_enabled={})",
|
||||
tok, stage3_enabled
|
||||
);
|
||||
}
|
||||
@ -104,7 +104,7 @@ impl NyashTokenizer {
|
||||
);
|
||||
if is_stage3 {
|
||||
eprintln!(
|
||||
"[tok-stage3] Keeping {:?} as keyword (NYASH_PARSER_STAGE3={})",
|
||||
"[tok-stage3] Keeping {:?} as keyword (stage3_enabled={})",
|
||||
tok, stage3_enabled
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user