Skip to content
Merged
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
7 changes: 6 additions & 1 deletion tests/property/quoted-path-parsing.prop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as fc from 'fast-check';
import { StataLexer } from '../../src/lexer';
import { StataParser } from '../../src/parser';
import { CommandNode } from '../../src/types';
import { arbitrary_non_reserved_identifier } from './generators';

/**
* Property tests for quoted path parsing fix.
Expand Down Expand Up @@ -73,9 +74,13 @@ describe('Quoted Path Parsing Property Tests', () => {

/**
* Generator for valid Stata identifiers (WORD tokens).
* Excludes reserved qualifier keywords (`if`, `in`), prefix commands
* (`by`, `bysort`, `quietly`, ...), and file commands (`do`, `use`, ...)
* which are parsed specially when they appear as the first identifier
* after a command. See tests/property/generators/primitives.ts.
*/
function arbitrary_identifier(): fc.Arbitrary<string> {
return arbitrary_macro_name();
return arbitrary_non_reserved_identifier();
}

/**
Expand Down
Loading