runner/env: centralize CLI/env getters; parser expr split (call/primary); verifier utils direct; optimizer: boxfield peephole; LLVM: branch cond normalize hook; add trace macro scaffolding; refactor common.rs verbose checks

This commit is contained in:
Selfhosting Dev
2025-09-17 06:55:39 +09:00
parent 9dc5c9afb9
commit c553f2952d
20 changed files with 651 additions and 677 deletions

View File

@ -20,11 +20,11 @@ impl NyashParser {
}
pub(crate) fn expr_parse_and(&mut self) -> Result<ASTNode, ParseError> {
let mut expr = self.parse_bit_or()?;
let mut expr = self.expr_parse_bit_or()?;
while self.match_token(&TokenType::AND) {
let operator = BinaryOperator::And;
self.advance();
let right = self.parse_equality()?;
let right = self.expr_parse_equality()?;
if std::env::var("NYASH_GRAMMAR_DIFF").ok().as_deref() == Some("1") {
let ok = crate::grammar::engine::get().syntax_is_allowed_binop("and");
if !ok { eprintln!("[GRAMMAR-DIFF][Parser] binop 'and' not allowed by syntax rules"); }