Skip to content

docs: remove stale func from pipe statement keywords#6087

Open
prql-bot wants to merge 1 commit into
mainfrom
docs/pipes-func-statement
Open

docs: remove stale func from pipe statement keywords#6087
prql-bot wants to merge 1 commit into
mainfrom
docs/pipes-func-statement

Conversation

@prql-bot

Copy link
Copy Markdown
Collaborator

Nightly survey finding. reference/syntax/pipes.md listed func as a statement keyword ("before a new statement, which starts with let or from (or func)"), but func no longer begins a statement in current PRQL — it only introduces an anonymous-function expression (func x -> ...); functions are declared with let name = func ....

Evidence: the statement parser accepts only module / type / import / var-def statements (prqlc-parser/src/parser/stmt.rschoice((module_def, type_def(), import_def(), var_def()))), and func is parsed as an expression by lambda_func (prqlc-parser/src/parser/expr.rs). The func add x -> ... statement form was valid in much older PRQL, so the note is stale.

No automated test: this is a prose bullet in the book with no executable code block to assert against.

`func` no longer begins a statement; it only introduces an anonymous
function expression. Functions are declared with `let name = func ...`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant