Commit Graph

28 Commits

Author SHA1 Message Date
Ryan Nowak d3e37f20ce Add some new IR nodes
This adds the basics of a few new node types. I'll do a follow up to start
using these so we can eliminate some misuse of the statement node.
2017-05-11 14:52:31 -07:00
Ryan Nowak 2afe2e1627 Rename RazorMethodDeclaration -> MethodDeclaration 2017-05-11 10:22:45 -07:00
Ajay Bhargav Baaskaran 4bc1a76e22 Moved TagHelperBinder from pass to a phase 2017-05-10 17:16:27 -07:00
Ryan Nowak eb3c47b6ca Add annotations
Fixes #990. This should make a lot of IR manipulations very simple.
2017-05-10 16:38:11 -07:00
N. Taylor Mullen 774aebaa01 Rename TagHelperDescriptorProvider => TagHelperBinder.
- Moved the type out of the Legacy namespace.
- Renamed the types method to `GetBinding` since `TagHelper` is now inferred.
- Updated test names to reflect new method/class name.
- Updated product code variables to reflect new naming (provider => binder).

#1289
2017-05-08 16:59:53 -07:00
Ryan Nowak a570139b08 Fix #1059 and #1060 2017-05-08 12:30:19 -07:00
Ryan Nowak 1705888721 Add a test for #153 - already fixed 2017-05-05 12:48:01 -07:00
Ajay Bhargav Baaskaran c71f6e7c3f [Fixes #1058] Added a test to verify nested enum behavior 2017-05-05 11:50:31 -07:00
Ryan Nowak e15d1be616 Introduce SourceChange in place of TextChange
This is the first step on the journey to replacing RazorEditorParser. We
can't just get rid of this because VS is using it today.
2017-05-03 17:53:08 -07:00
N. Taylor Mullen 0e509b4bbb Add incomplete directive integration tests.
- These tests validate that our extensible directives do not have code that explodes when an incomplete directive is encountered. This is typically the case when a user is in the midst of typing a directive at design time.
- Added an extensions test and a language test.

#1271
2017-05-01 14:32:17 -07:00
Ryan Brandenburg 8af9f656dd Add CodeGen tests for @inherits 2017-05-01 10:42:00 -07:00
N. Taylor Mullen f0d0c3d0b8 Merge branch 'preview-1/stabilization' into dev
# Conflicts:
#	build/dependencies.props
2017-04-28 17:20:20 -07:00
N. Taylor Mullen 207e0f0b59 Change `GetImports` to allow querying of information on non-existent files.
- Added tests to validate imports can still be found on non-existent files.

#1267
2017-04-28 17:00:24 -07:00
N. Taylor Mullen 49e3533bc3 Add test to validate unbalanced triple dash comment inside razor block.
#302
2017-04-27 12:03:59 -07:00
N. Taylor Mullen 344862fbc3 Change string token parsing to not flow errored tokens.
- Found that our extensible directive string parsing system wasn't consistent with the rest of the extensible directive tokens. Basically, if there were malformed string tokens we'd consume them and pass them along to extensible directive passes. This was a big no-no because it means extensible directive passes weren't able to rely on tokens being passed to them being well-formed.
- Fixed up existing extensible directive tests that relied on output of string tokens.

#1247
2017-04-26 16:38:58 -07:00
Ajay Bhargav Baaskaran 52c4abee9b Fix build break 2017-04-21 13:38:39 -07:00
Ajay Bhargav Baaskaran 4e2cd0c2d6 Finish writer implementation of the remaining IR nodes and added tests
- SetTagHelperPropertyIRNode
- ChecksumIRNode
- UsingStatementIRNode
- Preallocated attributes target extension
- HtmlAttributeIRNode and friends
- Design time directive helper target extension
- Removed renderers and rendering conventions
- Regenerated IR baselines
Issue - #846 and #1051
2017-04-21 11:46:34 -07:00
N. Taylor Mullen 1696e2aebf Upgrade Razor's Roslyn dependency to 2.0.0.
- Added C# 7 test to validate questionable features work end-to-end.
- Had to add several explicit package references to let our VS specific packages work as expected.

#1046
2017-04-21 11:40:21 -07:00
N. Taylor Mullen 715aa9bcae Fix cross plat tests for TagHelperBinderSyntaxTreePassTest. 2017-04-20 13:33:00 -07:00
N. Taylor Mullen f31b45d84a Enable TagHelper directives to handle malformed text.
- Prior to this change we'd try to substring a TagHelper directive with length 1 but our substring call would be for -1 (explosions).
- Added tests to validate that `@tagHelperPrefix`, `@removeTagHelper` and `@addTagHelper` all behave properly when they have malformed quotes.

#1242
2017-04-20 11:43:38 -07:00
Ajay Bhargav Baaskaran 0b17f14d68 Moved AddTagHelperHtmlAttribute from renderer to writer 2017-04-14 11:49:56 -07:00
Ajay Bhargav Baaskaran cd486226d6 [Fixes #1195] Add a way to parse just until the first directive 2017-04-13 15:02:17 -07:00
N. Taylor Mullen 3b31e977b2 Fix ability to generate baselines.
- Prior to this removing the `__RemoveThisBitTo__` wasn't sufficient to generate baselines; reason being the constants were defined in the wrong assembly. Since we moved test infrastructure bits around the constants needed to follow.
2017-04-13 11:07:02 -07:00
N. Taylor Mullen 1b8a4e704c Rename ITagHelperDescriptorBuilder => TagHelperDescriptorBuilder.
#1210
2017-04-11 17:08:38 -07:00
Ryan Nowak e5cac9fb7f Implement @namespace
This change adds support for @namespace, and introduces a set of
changes that are needed to support @namespace in the parser.

@namespace and @class have always been treated as reserved words by Razor,
with the intent that someday they would be allowed as directives.

This changes makes that possible.

You will still get an error about @namespace being a reserved word if you
don't have the directive.
2017-04-11 12:46:02 -07:00
Ryan Nowak 207f40f92d Move test infrastructure
This moves the test infrastructure to a common project and udpates the MVC
tests to use the good integration testing features.
2017-04-10 19:42:56 -07:00
Ajay Bhargav Baaskaran 0f7b0f5d8c [Fixes #1196] Remove Content property from HtmlContentIRNode 2017-04-10 12:54:11 -07:00
N. Taylor Mullen 0618bae3bd Rename Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
- Also updated corresponding test project to go from Evolution => Language.
- Regenerated test files to reflect new file paths.

#1169
2017-04-10 10:20:04 -07:00