Commit Graph

1149 Commits

Author SHA1 Message Date
Ryan Nowak a40ca857c5 Rename HtmlAttributeValueStyle>AttributeStructure 2017-06-21 18:56:37 -07:00
Ryan Nowak b36bbac60a Clean up .Legacy
Also sealed two types that didn't get the treatment.
2017-06-21 18:42:52 -07:00
Ajay Bhargav Baaskaran 4811807329 Moved CSharpCodeWriter out of legacy 2017-06-21 15:05:46 -07:00
Ryan Nowak 21e26ad4aa Rename RazorIRNode
Get rid of references to 'IR'
2017-06-21 12:55:16 -07:00
Ryan Nowak d2469e078a Move Source down to ExtensionIRNode 2017-06-20 23:19:55 -07:00
Ryan Nowak 8649e1a4be Add Tag Helper descriptors to the Tag Helper node 2017-06-20 23:19:49 -07:00
Ryan Nowak 062d7561ae Make section an extension node 2017-06-20 19:20:46 -07:00
N. Taylor Mullen 132c8c7a7e Implement consistent error story for directives.
- Added error case that enforces whitespace in between directive tokens.
- Upon encountering invalid directive tokens/states we bail out of parsing and log an appropriate error.
- Raised directive parse errors to the IR layer. This is slightly hacky given the parsers limitations; we swap out the error sink temporarily to capture all directive parser errors and then shove the errors collected onto the directives chunk generator.
- Added a `MalformedDiretiveIRNode` and corresponding pass to represent directives that are in an invalid state. Chose to not take the path of using the default `DirectiveIRNode.Diagnostics` member to enable users who are extending directives to only ever have to work with "valid" directives. If they want to work with malformed directives they can search the IR document for their malformed counterpart and handle it separately.
- Updated existing test expectations
- Removed some existing tests that were no longer valid (we don't call into user code if a directive is malformed).

#1173
2017-06-19 21:14:06 -07:00
Ajay Bhargav Baaskaran dd4e163173 Change GenerateChecksum to SuppressChecksum 2017-06-19 16:52:36 -07:00
Ajay Bhargav Baaskaran 3892a6fede Removed ChecksumIRNode 2017-06-16 11:14:54 -07:00
Kiran Challa dea8948249 Merge branch 'rel/2.0.0-preview2' into dev-gate
# Conflicts:
#	build/dependencies.props
#	test/Microsoft.AspNetCore.Mvc.Razor.Extensions.Test/Microsoft.AspNetCore.Mvc.Razor.Extensions.Test.csproj
#	test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Microsoft.VisualStudio.LanguageServices.Razor.Test.csproj
2017-06-15 04:23:55 -07:00
Mike Harder 5eea3f50c5 Changed all references of PackageTargetFallback to AssetTargetFallback (#1441) 2017-06-14 15:16:56 -07:00
Ryan Nowak 7b44ea7a8f Revert "Revert "Update Roslyn Version to support C# 7.1""
This reverts commit 48285f63c6.
2017-06-14 12:38:22 -07:00
Ryan Nowak 8599870648 Revert "Revert "Update Roslyn Version to support C# 7.1""
This reverts commit 48285f63c6.
2017-06-14 11:56:56 -07:00
Ryan Nowak 22d52f2a3c Split the functions/section/inherits directives 2017-06-13 18:05:34 -07:00
Ajay Bhargav Baaskaran 27ac5da6d5 Add indexer null-check for preallocated tag helper attributes 2017-06-13 10:53:07 -07:00
N. Taylor Mullen e3287ae672 Add diagnostics to the IR.
- Added a `Diagnostics` and `HasDiagnostics` properties to `RazorIRNode`. The `HasDiagnostics` property was necessary in order to traverse nodes without forcibly instantiating their diagnostic lists.
- Added `GetAllDiagnostics` extension method for `RazorIRNode` to provide a way to retrieve all diagnostics that exist on and under a `RazorIRNode`.
- Updated `RazorIRNodeWriter` to display any diagnostics that exist on IR nodes.
- Internal `RazorIRNode`s do not have mutable `Diagnostics` because we don't currently add diagnostics to these elements.
- Added `DefaultIRLoweringPhaseTest` to validate that errors flow from syntax tree to IR document. Also added a missing test.
- Updated the `CSharpLoweringPhaseTest`s to properly validate that errors flow from IR document => csharp document. This resulted in movement of code to the ir lowering phase tests.

#1412
2017-06-13 10:28:41 -07:00
Ryan Nowak 6860806213 Make usage of FileName and FilePath consistent
FileName => "Foo.cshtml"
FilePath => "/Bar/Baz/Foo.cshtml"
2017-06-12 16:15:26 -07:00
Ryan Nowak 6ce71c24e5 Add RazorIRNodeReference for manipulating nodes 2017-06-12 13:46:59 -07:00
Pranav K 1fb3c8c26f Remove Roslyn from NuGet.config.
Update StreamRpcJson to 1.0.36. This package has an assembly version that matches the version shipped in VS 2017 RTM.
2017-06-12 13:33:55 -07:00
Kiran Challa 6304699bf4 Removed Roslyn feed as we are now mirroring these packages 2017-06-12 08:16:11 -07:00
Ajay Bhargav Baaskaran f099232ca4 Moved scope writer logic to BasicWriter 2017-06-09 12:10:00 -07:00
Ajay Bhargav Baaskaran 27b73d737b Set correct value style for literal tag helper bound attributes 2017-06-09 12:05:27 -07:00
Ryan Nowak 503ba669d0 Get rid of Parent from IR node 2017-06-08 19:22:14 -07:00
Ryan Nowak 14944a2791 Add collection types for IR children 2017-06-08 17:18:15 -07:00
Ryan Nowak 118fefb7e2 Rename incorrect casing 2017-06-08 17:18:15 -07:00
Ryan Nowak 17800b6055 Fix #1355 Make extension nodes check for their extensions 2017-06-08 17:08:04 -07:00
Ryan Nowak e05c697c58 Fix #1356 verify diagnostics in integration tests 2017-06-08 17:03:43 -07:00
Nate McMaster 4d18334573 Target .NET Standard 2.0 2017-06-08 16:37:27 -07:00
Ajay Bhargav Baaskaran 8bba757703 Don't ignore whitespace at the start of '<text>' tag 2017-06-08 11:56:24 -07:00
Pranav K 758be9ae13 Remove usage of TaskCache 2017-06-08 11:05:39 -07:00
Ajay Bhargav Baaskaran a6d2c04195 [Fixes #1379] Rename CSharpStatement to CSharpCode 2017-06-07 15:20:47 -07:00
Ryan Nowak 95c5049dd0 Add DisplayName and Description for directives
Renamed Name -> Directive so that it doesn't overlap with DisplayName.
2017-06-07 13:37:34 -07:00
Nate McMaster 1dfe37b55a React to downstream upgrades to .NET Standard 2.0 2017-06-07 12:51:48 -07:00
Ryan Nowak 45dec0dca4 Fix #1407 null refs in VCTH tests
Dictionary isn't thread safe YO.
2017-06-07 12:37:04 -07:00
Ajay Bhargav Baaskaran 74fef5f722 Moved VCTH types to Razor.Extensions 2017-06-06 15:49:35 -07:00
Ryan Nowak 6664efb6d9 Fixes #1296 - ItemCollection should be ICollection
A little bit more kindness for consumers.

I didn't add any tests because these are all just trivial forwards.
2017-06-06 11:11:30 -07:00
Pranav K d5c1c63d19 Generate assembly attributes as part of code generation 2017-06-05 14:24:17 -07:00
Mike Harder f658d3a080 Merge remote-tracking branch 'origin/rel/2.0.0-preview2' into dev 2017-06-05 11:15:50 -07:00
Mike Harder 48285f63c6 Revert "Update Roslyn Version to support C# 7.1"
This reverts commit 8f299c5b11.
2017-06-05 10:39:20 -07:00
Ryan Nowak 8297633445 Merge branch 'rel/2.0.0-preview2' into dev 2017-06-03 17:34:10 -07:00
Ryan Nowak 8f299c5b11 Update Roslyn Version to support C# 7.1 2017-06-03 17:27:40 -07:00
Ryan Nowak fcb8669c98 Use project.json for the VSIX project
Also did some spring cleaning on redundent references in the language
services package.

Note that the 'immutable' packages are now totally redundant with
Shell.15.0. You're supposed to use one or the other. Since our minimum VS
is 15, I just went with shell 15.0.

Now the VSIX project doesn't have many references in it.
2017-06-03 17:27:35 -07:00
Ajay Bhargav Baaskaran 9e89808457 Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 17:24:50 -07:00
Ajay Bhargav Baaskaran eb2e090e2a Fix failing test 2017-06-01 17:24:24 -07:00
Ajay Bhargav Baaskaran f390830eda Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 17:16:13 -07:00
Ajay Bhargav Baaskaran eab052d9e0 Merge branch 'rel/15.3' into rel/2.0.0-preview2 2017-06-01 17:15:07 -07:00
Ajay Bhargav Baaskaran 4c1795fc79 [Fixes #1394] Fix unexpected indentation when autoformatting in VS 2017-06-01 15:57:52 -07:00
N. Taylor Mullen 517eba930f Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 15:48:07 -07:00
N. Taylor Mullen 4fde9ca07d Merge branch 'rel/15.3' into rel/2.0.0-preview2
# Conflicts:
#	src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpCodeParser.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpAutoCompleteTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpSectionTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpSpecialBlockTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/HtmlDocumentTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/HtmlToCodeSwitchTest.cs
2017-06-01 15:32:47 -07:00