-
Notifications
You must be signed in to change notification settings - Fork 0
Feature: type args support #34
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #34 +/- ##
==========================================
- Coverage 93.26% 92.75% -0.52%
==========================================
Files 12 13 +1
Lines 193 207 +14
==========================================
+ Hits 180 192 +12
- Misses 13 15 +2
Continue to review full report at Codecov.
|
use crate::ir::ir_component::IRComponent; | ||
use crate::parser::ast::traits::ast_term::ASTTerm; | ||
|
||
pub struct TypeArgumentTerm { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use a word dimension instead argument to describe the sense of this term?
let fields = vec![ | ||
let mut fields = vec![ | ||
("name", self.name.generate_ir()), | ||
("type", self.type_name.generate_ir()), | ||
("hasDefault", Box::new(IRComponent::new_bool(false))), | ||
]; | ||
|
||
if self.type_arguments.len() > 0 { | ||
fields.push(("typeArguments", self.generate_type_arguments_ir())) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we extract fields building to a separate method, for instance, build_fields
to make generate_ir do only one thing?
Hi @Arcimiendar, thank you for a pr, please check my comments. |
add Number args to entity field types.
Example:
entity asdf {
someField: String(256),
someOtherField: Decimal(10, 3)
}