# Swamp Analyzer
Performs semantic analysis for the [Swamp programming language](https://github.com/swamp/swamp).
## Overview
This crate bridges the gap between parsing and code generation/interpretation. It takes the Abstract Syntax Tree (AST) generated by `swamp-parser` (using types from `swamp-ast`) and transforms it into a type-checked, resolved Abstract Semantic Graph (ASG) defined in `swamp-semantic`.
The core process involves:
* **Type Checking:** Verifying that operations, assignments, function calls, etc., adhere to the Swamp type system rules.
* **Name Resolution:** Linking identifiers (variables, functions, types) to their definitions within the correct scope.
* **Semantic Validation:** Performing other checks like correct function arity, operator usage, and pattern matching exhaustiveness (potentially).
* **ASG Construction:** Building the `swamp_semantic::Expression` tree, which represents the program with full type information and resolved references.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Copyright
Copyright (c) Peter Bjorklund. All rights reserved. https://github.com/swamp/swamp