[pull] master from GaijinEntertainment:master#992
Merged
Conversation
When `InferTypes::visit(ExprVar*)` substitutes an `assume` alias, the
cloned subtree now carries the use-site's LineInfo instead of the alias
definition site's. Lint and any other diagnostic on substituted nodes
now reports where the user wrote the code, not where the alias was
declared.
Concretely:
assume tabi = tab[2] // line 1
summ(tab[1], tabi) // line 2 <-- error reported HERE now
Previously the table-lookup-collision lint flagged line 1; now it
flags line 2.
Knock-on: `tests/language/failed_assume_loop.das` — the two `y` errors
in the cloned `y+y` body now collapse onto the same `{x}` use-site
position and dedup to one error with (×2), so the expected 30838 count
drops from 4 to 3. The (×2) suffix preserves the info that the
substituted body had two failing references.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…alias-location-30250 infer: assume-alias substitution reports at use-site
Top-level statements that need SEMICOLON terminator (`options X`,
`require X`, `expect X`, top-level reader macros) failed to parse when
sitting as the last thing in a file lacking a trailing `\n`:
options gen2
options log <- error[30151] at this token
The natural newline rule emits a synthetic semicolon when not nested and
not after a keyword; the `<normal><<EOF>>` rule skipped that emission
and returned 0 immediately. The legacy gen1 lexer already handles this
via `BEGIN(indent)` + return SEMICOLON; gen2 was an oversight.
Fix: add a dedicated `eof_done` flex state. The first EOF in `<normal>`
emits `das_indent_char` under the same predicate the `\n` rule uses
(`!das_keyword && !das_nested_parentheses && !das_nested_square_braces`)
and switches to `eof_done`; that state's `<<EOF>>` rule returns 0. No
C++-side flag, no state-reset to remember in `das2_yybegin`.
Also rides along: two blind-mouse cache cards from this morning's
pages.yml debugging.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eof-synth-semi parser/gen2: synthesize trailing semi at EOF without newline
`.rst-content dl.py dt, dl.c dt, dl.cpp dt, dl.rst dt` did not cover the custom `das` Sphinx domain, so signature boxes on stdlib pages rendered with sphinx_rtd_theme's white default. Switch to the domain-agnostic `dt.sig-object` selector (every Sphinx 4+ directive signature carries that class) and add inner-span rules so the function name picks up --amber and params/return type sit at --fg-dim instead of inheriting sphinx_rtd_theme's dark-blue. Field-list label and bold param names drop one notch via a new --fg-soft token (halfway between --fg and --fg-dim) so "Arguments:" / parameter names don't read as a wall of white in long type signatures.
…istory - index.html / downloads.html: replace bogus `daslang run hello.das` with `daslang hello.das` (no `run` subcommand), swap the AOT block for JIT (`-jit hello.das`) since that's the real "native speed" knob without a C++ build step, and wrap the releases URL in an `<a>` so it's clickable. - Build-from-source tab: fix the binary path (`./build/daslang`, not `./bin/daslang` — single-config Make/Ninja lands the binary in `build/`), use `cmake -B build -S . -DCMAKE_BUILD_TYPE=Release` + parallel `-j 8`, and drop the leftover `run` from the run line. - Top nav: add a `playground` link after `community` in both index.html and downloads.html. - Visible "daScript" labels → "daslang" (the URLs themselves still point at the real `/daScript` repo so the links work; copy-paste commands keep the real URL too, and the SEO `<meta name="keywords">` keeps the legacy term). - forge.css: `white-space: nowrap` on `.forge-stat__n` so the hero stats "interp · AOT · JIT" and "embed · standalone" no longer wrap onto two lines. Playground (web/ui/src/main.js + site/playground/playground-init.js): - `runCode()` now `history.pushState`s the share URL on every Run (skipping no-op pushes when state hasn't changed). The address bar becomes the share link, so users don't have to hunt for the share button before copying. - New `popstate` listener re-runs `applySharedCodeFromHash`, so Browser Back/Forward walks a real history of code changes — each Run is a navigable entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s-domain doc/css: cover das domain in dark theme, dim return type & field labels
Prints daslang version (MAJOR.MINOR.PATCH from platform.h) and exits 0. The version string was already shown as the first line of `daslang` no-args help, but there was no way to query it programmatically without parsing help output or pulling the binary's strings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…l-fixes-and-playground-url-history site: fix install snippet, add playground nav link, wire playground URL history
…-flag cli: add --version / -version flag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )