allow function calls in template strings, update changelog
This commit is contained in:
parent
389d791ac1
commit
9ead94a6b9
|
|
@ -20,12 +20,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Member access (e.g. `.objective` to get objective name where int is stored)
|
- Member access (e.g. `.objective` to get objective name where int is stored)
|
||||||
- Return statement
|
- Return statement
|
||||||
- internal `print` function
|
- internal `print` function
|
||||||
- reserve `while` and `for` keyword
|
- While loop
|
||||||
|
- `for` keyword
|
||||||
- Example: barebones compiler
|
- Example: barebones compiler
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Change the syntax to set the type of a tag from `tag "[name]" of "[type]"` to `tag<"[type]"> "[name]"`
|
- Change the syntax to set the tag type from `tag "[name]" of "[type]"` to `tag<"[type]"> "[name]"`
|
||||||
- Remove the keyword `of`
|
- Remove the keyword `of`
|
||||||
- Option to deduplicate source files during serialization when using `SerdeWrapper`
|
- Option to deduplicate source files during serialization when using `SerdeWrapper`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1087,6 +1087,16 @@ impl TemplateStringLiteral {
|
||||||
Expression::Primary(Primary::MemberAccess(member_access)) => {
|
Expression::Primary(Primary::MemberAccess(member_access)) => {
|
||||||
member_access.parent().analyze_semantics(scope, handler)?;
|
member_access.parent().analyze_semantics(scope, handler)?;
|
||||||
}
|
}
|
||||||
|
Expression::Primary(Primary::FunctionCall(func)) => {
|
||||||
|
if let Some(args) = func.arguments() {
|
||||||
|
for arg in args.elements() {
|
||||||
|
if let Err(err) = arg.analyze_semantics(scope, handler) {
|
||||||
|
handler.receive(err.clone());
|
||||||
|
errs.push(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let err = error::Error::UnexpectedExpression(UnexpectedExpression(
|
let err = error::Error::UnexpectedExpression(UnexpectedExpression(
|
||||||
expression.clone(),
|
expression.clone(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue