-
Notifications
You must be signed in to change notification settings - Fork 62
Add additional features for NG2 output AST parity #29
Conversation
| @override | ||
| AstNode buildAst([Scope scope]) => buildFunction(scope); | ||
| AstNode buildAst([Scope scope]) { | ||
| if (_name != null) { |
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.
More of a personal style, but I like to use => and ternary operator here:
buildAst() => _name != null ? buildFunction() : buildExpression();
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.
Honestly just because dartfmt doesn't do a great job with > 80 char lambdas.
I can change it in a future PR
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.
Fair enough. Like I said, it's just my personal preference.
|
|
||
| @override | ||
| Expression buildExpression([Scope scope]) { | ||
| return new FunctionExpression( |
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.
Why not just use => ?
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.
Same as above
| String name, | ||
| String importFrom, | ||
| ) | ||
| : super._(name, importFrom); |
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.
Indentation seems off here. Dartfmt?
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.
This is dartfmt :-/
| @@ -1,5 +1,5 @@ | |||
| name: code_builder | |||
| version: 1.0.0-alpha+2 | |||
| version: 1.0.0-alpha+3 | |||
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.
I'm not really sure about the standard practice here, but should we bump the version # given a breaking change? Or because this is all still alpha, we're not too worried?
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.
Yeah, I'm basically making the assumption anyone using -alpha is using an experimental branch - not worth the churn over making this version 33.0.0 by the time we are done.
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.
SGTM
alorenzen
left a comment
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.
LGTM
…builder#29) * Various changes. * Update presubmit. * Add more features required for ng2 parity.
Closes dart-lang/tools#956
Closes dart-lang/tools#957
1.0.0-alpha+3
TypeBuilder:importFrombecomes a named, not positional argument, and the namedargument
genericTypesis added (Iterable<TypeBuilder>).ReferenceBuilder:ReferenceBuilder.buildAstwas not implementedandandormethods toExpressionBuilder:MethodBuilder.closure: