Skip to content

feat(sema): add core semantic checks - #16

Merged
ofabiodev merged 12 commits into
mainfrom
add-core-semantic-checks
Aug 2, 2026
Merged

feat(sema): add core semantic checks#16
ofabiodev merged 12 commits into
mainfrom
add-core-semantic-checks

Conversation

@ofabiodev

Copy link
Copy Markdown
Member

Summary

Adds semantic checking layer for Puff, validating scopes, names, visibility, required events, control flow, and basic type compatibility.

Changes

  • Add semantic symbol resolution, type inference, global initialization, and import visibility checks
  • Validate required load and tick events, return paths, stop, assignments, collections, and function arguments
  • Add unit and end-to-end fixtures covering semantic diagnostics, scopes, cyclic globals, indexed paths, and type edge cases

Testing

make test
make build

cd src
go vet ./...
go test -count=1 ./...
go test -count=20 ./internal/sema

@ofabiodev ofabiodev added kind/feature New behavior or capability. kind/test Tests, fixtures, golden files, or test infrastructure. area/sema Types, scopes, validation, and semantic rules. puff/syntax Puff language syntax and grammar behavior. puff/diagnostics Error messages, hints, notes, and source spans. labels Aug 2, 2026
@ofabiodev
ofabiodev merged commit 0b0dacc into main Aug 2, 2026
2 checks passed
@ofabiodev
ofabiodev deleted the add-core-semantic-checks branch August 2, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sema Types, scopes, validation, and semantic rules. kind/feature New behavior or capability. kind/test Tests, fixtures, golden files, or test infrastructure. puff/diagnostics Error messages, hints, notes, and source spans. puff/syntax Puff language syntax and grammar behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant