Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Located formula errors, window-free: the byte span of the formula an error is about, its message, and a “why” hint for the common cases (a misspelled name, the wrong number of arguments, a ( left open, an aggregation without OVER). The formula editors underline the span and show the message and the hint under the row.

Structs§

Diagnostic
An error located in a formula’s text.

Functions§

arity 🔒
"PMT takes …, got 2 argument(s)": the function and the count given.
arity_hint 🔒
What is off about calling d with n arguments.
call_name 🔒
The span of the last name( call starting before byte before.
closest 🔒
Up to three of names nearest word by edit distance (ignoring case), within a third of its length (at least 2), nearest first.
compile_error
A compile (type or dimension) error for text, which has no position: underline the first function or measure the message names that also appears in the text.
did_you_mean 🔒
ident_char 🔒
in_string 🔒
Whether byte i of text is inside a "string".
mentioned_span 🔒
The span in text of the first function or measure message names: a measure by its exact name, a function by its upper-case name (as messages print it) written as a call. Earliest in the message wins.
occurrences 🔒
Every whole-word occurrence of name in text outside strings (ignoring ASCII case when nocase).
parse_error
Locate err (from parsing text) and add a hint where one helps.
token_at
The token starting at byte pos: a 'quoted name', a word, or one character. At or past the end, the last character.
unclosed_paren 🔒
Byte offset of the innermost ( left open at the end of text; parentheses in strings and quoted names do not count.
unknown_category 🔒
unknown_measure 🔒