Skip to content

Vox 0.4.14

Latest

Choose a tag to compare

@TheJostler TheJostler released this 28 Aug 20:20
v0.4.14
4995394

Four register fixes (#102, #105, #106, #108) and the diagnostic halves of two more (#103, #104); a Free statement that releases a buffer's memory immediately; the reserved-word tables now generated from one source. 33,000 fuzzer programs on 0.4.13 found no further compiler defects.

Fixed

  • A call missing its preposition now names the missing preposition.
    A bare or quoted name written right after a callee with no of/to/
    with/on used to be silently split into two statements — the call
    reporting the wrong arity and the name a second, unrelated "Unknown
    function" error. It is now one diagnostic, anchored at the name itself
    (#105).
  • A rejected thing field type no longer also fires a garbled
    default-mismatch error.
    The default-vs-type check ran before the
    field-type-support check, and had no arm for an unsupported type, so
    the two slots of "expected X, got Y" rendered the same word. Support
    is decided first now; an unsupported type reports only the "cannot
    hold yet" error (#103).
  • each ... from over a non-list anchors its caret at the loop, not
    the collection's declaration.
    The diagnostic searched for the
    collection's textually-first mention, which in a large file could be
    hundreds of lines from the offending loop. It now anchors at the
    each ... from clause's own use of the collection (#104).
  • Set <text> to "<format>" frees the string it replaces instead of
    leaking one buffer per evaluation.
    A whole-program gate proves a
    text variable's string is never shared before its Set frees the old
    one, so the natural accumulate idiom (Set acc to "{acc}x" in a loop)
    is no longer quadratic (#108).
  • print's aliases were reserved unevenly, and the keyword table that decides every other reserved word had drifted from the lexer throughout. show, display, and prints are live aliases the lexer folds onto print and stay reserved; say and output are not folded at all and stay ordinary variable names — no shipped program's behaviour changes. The alias fold now lives in exactly one place, a RESERVED_ALIASES const in src/lexer/tokens.rs, which string_is_keyword reads from and LANGUAGE.md's Reserved Aliases table (now 85 rows, generated from and checked against the same const) is generated from, so the two tables cannot drift apart again the way they did here (#106; closes #238).

Added

  • Free/Release/Deallocate <buffer> releases a buffer's memory
    immediately; the buffer is then empty and refuses writes with the error
    flag (documented under Releasing a Buffer).