Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ data v2_lexer_carries_no_layout_so_a_newline_before_a_dual_role_operator_merges_
DeclarationRef { module_path: "v2.test.parse.newline_dual_role_operator_parse", decl_name: "a_newline_minus_after_an_operand_refuses_holds", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.parse.newline_dual_role_operator_parse", decl_name: "a_newline_minus_after_a_block_refuses_holds", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.parse.newline_dual_role_operator_parse", decl_name: "a_same_line_minus_is_subtraction_holds", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.parse.newline_dual_role_operator_mutation", decl_name: "witness_the_live_grammar_carries_the_newline_refusal", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.parse.newline_dual_role_operator_mutation", decl_name: "witness_without_the_refusal_a_next_line_minus_after_an_operand_merges_RED", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.parse.newline_dual_role_operator_mutation", decl_name: "witness_without_the_refusal_a_next_line_minus_after_a_block_merges_RED", field: WholeDeclaration },
DeclarationRef { module_path: "test.claim.parse_test_newline_dual_role_operator_mutation", decl_name: "witness_the_live_grammar_carries_the_newline_refusal", field: WholeDeclaration },
DeclarationRef { module_path: "test.claim.parse_test_newline_dual_role_operator_mutation", decl_name: "witness_without_the_refusal_a_next_line_minus_after_an_operand_merges_RED", field: WholeDeclaration },
DeclarationRef { module_path: "test.claim.parse_test_newline_dual_role_operator_mutation", decl_name: "witness_without_the_refusal_a_next_line_minus_after_a_block_merges_RED", field: WholeDeclaration },
],
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module v2.test.parse.choice_lookahead_guard_test
module test.claim.parse_test_choice_lookahead_guard

import std.algebra { Cons, Empty }
import v2.std.grammar {
Expand Down Expand Up @@ -155,8 +155,11 @@ test fn guard_missing_one_word_keeps_that_row() -> Bool {

// THE ROUTE ON REAL INPUT, for a row the lookahead proof removed with no guard: `stmt`'s `return` head
// against let_sugar's bare `name = e`, whose name admits the keyword. `=` begins no expression, so
// `return 1` and `return = 1` start alike only for one token. Each must take its own alternative:
// the return statement carries no let_expr, the bare assignment is one.
// `return 1` and `return = 1` start alike only for one token. The return statement takes its own
// alternative and carries no let_expr. The bare assignment is REFUSED: since gunbc#13168 a keyword is
// not a value name, so `return` can never bind (gunbc.recurring_failure_mode
// seed_admits_a_keyword_as_a_pattern_binder; that row's declared rung is that this position refuses
// unnamed, so this claim asserts the refusal and not its reason).
fn clg_parse(text: String, file: Symbol) -> Outcome<Node> {
match dag_prepared_grammar() {
Rejected { diagnostics: d } => Rejected { diagnostics: d }
Expand Down Expand Up @@ -195,9 +198,9 @@ test fn return_statement_takes_the_return_route() -> Bool {
}
}

test fn keyword_named_bare_assignment_takes_the_let_route() -> Bool {
test fn keyword_named_bare_assignment_is_refused() -> Bool {
match clg_parsed_has_let(text: "module probe.clg_assign\nfn f() -> Int {\n return = 1\n 1\n}\n", file: ^clg_assign) {
Present { value: has_let } => has_let
Absent => false
Present { value: _ } => false
Absent => true
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module v2.test.parse.newline_dual_role_operator_mutation
module test.claim.parse_test_newline_dual_role_operator_mutation

import v2.compiler.parse { PreparedGrammar, parse_module_prepared, prepare_grammar }
import v2.std.diagnostic { Outcome }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly
// (v2.extdeps.languages.dag dag_grammar_additive_expr_helper). Each side of the rule, through the
// live prepared grammar on a lexed stream (which carries its layout): the next-line forms refuse at
// the `-`, for a plain operand and for a block, and the same-line form parses. The
// mutation that reds the refusals is v2.test.parse.newline_dual_role_operator_mutation.
// mutation that reds the refusals is test.claim.parse_test_newline_dual_role_operator_mutation.

fn n_tokenize_parse(text: String, file: Symbol) -> Outcome<Node> {
match dag_prepared_grammar() {
Expand Down