Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Add support for raw builders #57

Merged
merged 1 commit into from
Jan 11, 2017
Merged

Conversation

matanlurey
Copy link
Contributor

@matanlurey matanlurey commented Jan 10, 2017

Closes dart-lang/tools#895 by parsing expressions and statements (wrapping them in a function), and then using the resulting AST as the result of the builder itself.

Also updates the CHANGELOG.md and pubspec.yaml for 1.0.0-beta+1.

/cc @alorenzen

- Add support for `switch` statements
- Add support for a raw expression and statement
- `new ExpressionBuilder.raw(...)`
- `new StatemnetBuilder.raw(...)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] typo in statement

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@override
AstNode buildAst([Scope scope]) {
FunctionDeclaration d =
parseCompilationUnit('main() => ${_raw(scope)};').declarations.first;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include a description of how this works in the commit message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! Done.

@matanlurey matanlurey merged commit 9fb759b into dart-archive:master Jan 11, 2017
@matanlurey matanlurey deleted the raw branch January 11, 2017 04:14
mosuem pushed a commit to dart-lang/tools that referenced this pull request Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add a new Statement/Expression.raw(...)
3 participants