Summary
Three constructs that appear in the documentation (or read as natural WFL) are rejected by the parser in the current build. Either the parser or the docs should change so they agree.
Environment
- WFL built from source,
.build_meta.json: { "year": 26, "month": 6, "build": 5 }
- Linux, release build
1. substring of <text> from <start> length <length>
Documented in Docs/05-standard-library/text-module.md:
substring of <text> from <start> length <length>
and used in Docs/04-advanced-features/web-servers.md:
store filename as substring of path from 8 length 100
But it fails to parse:
store t as substring of "abcdefghij" from 0 length 5 // Parse error: Unexpected token in expression: KeywordFrom
The and form works:
store t as substring of "abcdefghij" and 0 and 5 // OK -> "abcde"
2. split of <text> by <delimiter>
Documented in Docs/05-standard-library/text-module.md:
split of <text> by <delimiter>
...
store parts as split of csv by ","
But it fails to parse:
store parts as split of "a-b-c" by "-" // Parse error
The string_split ... and form works:
store parts as string_split of "a-b-c" and "-" // OK -> ["a","b","c"]
3. is not equal to
is equal to works, but the natural negation does not parse:
check if n is not equal to 3: // Parse error: Unexpected token: KeywordEqual
Current workaround:
check if not (n is equal to 3): // OK
Expected
Either implement these documented/natural forms in the parser, or update the docs (and any example programs / web-servers.md) to only show the supported spellings (substring of X and START and LENGTH, string_split of X and DELIM, not (X is equal to Y)).
These are minor but they trip up anyone following the docs.
Summary
Three constructs that appear in the documentation (or read as natural WFL) are rejected by the parser in the current build. Either the parser or the docs should change so they agree.
Environment
.build_meta.json:{ "year": 26, "month": 6, "build": 5 }1.
substring of <text> from <start> length <length>Documented in
Docs/05-standard-library/text-module.md:and used in
Docs/04-advanced-features/web-servers.md:But it fails to parse:
The
andform works:2.
split of <text> by <delimiter>Documented in
Docs/05-standard-library/text-module.md:But it fails to parse:
The
string_split ... andform works:3.
is not equal tois equal toworks, but the natural negation does not parse:Current workaround:
Expected
Either implement these documented/natural forms in the parser, or update the docs (and any example programs /
web-servers.md) to only show the supported spellings (substring of X and START and LENGTH,string_split of X and DELIM,not (X is equal to Y)).These are minor but they trip up anyone following the docs.