Commit Graph

125 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran 8e667ba730 Rename parser tests to have shorter names 2018-07-19 15:22:30 -07:00
Ajay Bhargav Baaskaran 21f2edce16 Generate and verify baselines for ClassifiedSpans and TagHelperSpans
- Moved GetClassifiedSpans and GetTagHelperSpans logic to Razor.Language
2018-07-17 10:54:42 -07:00
Ajay Bhargav Baaskaran ce4780a830 Renamed symbol to token everywhere
- Updated Resources
- Updated test code
- Regenerated baselines
- Added exclusions for apicheck (See https://github.com/aspnet/BuildTools/issues/704)
2018-07-06 16:29:36 -07:00
Ajay Bhargav Baaskaran ed7c4e8f5c Parser tests clean up 2018-07-06 16:24:39 -07:00
Ajay Bhargav Baaskaran f9a09372b7 Converted TagHelperBlockRewriterTest 2018-06-29 15:33:21 -07:00
Ajay Bhargav Baaskaran 984e7826d6 Converted TagHelperParseTreeRewriterTest 2018-06-29 12:23:52 -07:00
Ajay Bhargav Baaskaran b232a1103a Prereq for converting tag helper tests 2018-06-29 12:15:13 -07:00
Ryan Nowak 942d4d194c Convert HtmlToCodeSwitchTest 2018-06-28 13:30:52 -07:00
N. Taylor Mullen 42e8f4abc8 Convert HtmlTagsTest to use baselines.
#2263
2018-06-28 10:49:15 -07:00
N. Taylor Mullen 8211dfff9c Convert HtmlErrorTest to use baselines.
#2263
2018-06-28 10:49:15 -07:00
Ryan Nowak ea96c50dce Convert WhitespaceRewriterTest 2018-06-27 17:02:03 -07:00
Ajay Bhargav Baaskaran 8eef4a4bb3 Convert HtmlDocumentTest 2018-06-27 15:47:57 -07:00
N. Taylor Mullen 67b5588185 Convert CSharpWhitespaceHandlingTest to use baselines.
#2263
2018-06-27 15:09:33 -07:00
Ajay Bhargav Baaskaran 048a6ec3ea Converted HtmlAttributeTest 2018-06-27 14:47:44 -07:00
N. Taylor Mullen 5950928baa Convert CSharpSpecialBlockTest to use baselines.
#2263
2018-06-27 14:35:22 -07:00
Ajay Bhargav Baaskaran a7fd53b3a3 Convert CSharpNestedStatementsTest 2018-06-27 13:43:51 -07:00
Ajay Bhargav Baaskaran df22392996 Convert CSharpImplicitExpressionTest 2018-06-27 13:43:51 -07:00
Ajay Bhargav Baaskaran d48946c2e0 Convert CSharpExplicitExpressionTest 2018-06-27 13:43:50 -07:00
Ryan Nowak 363be73a00 Convert more tests
CSharpRazorCommentsTest
CSharpReservedKeyWordsTest
CSharpToMarkupSwitchTest
2018-06-27 13:14:58 -07:00
Ryan Nowak 4fda468f06 Convert CSharpSectionTest 2018-06-27 13:14:58 -07:00
Ajay Bhargav Baaskaran c0929a9002 Convert CSharpErrorTest 2018-06-27 12:53:52 -07:00
N. Taylor Mullen 69cfb95b90 Convert CSharpStatementTest to use baselines.
#2263
2018-06-27 12:24:52 -07:00
N. Taylor Mullen 25547e80d1 Convert CSharpTemplateTest to use baselines.
#2263
2018-06-27 12:24:52 -07:00
Ajay Bhargav Baaskaran ab27e0bd52 Converted CSharpBlockTest to use baselines 2018-06-26 18:02:50 -07:00
Ajay Bhargav Baaskaran 1e58748f59 Converted HtmlBlockTest to use baselines 2018-06-26 16:09:05 -07:00
Ajay Bhargav Baaskaran a92089d2f9 Converted CSharpDirectivesTest to use baselines 2018-06-26 15:17:36 -07:00
Ajay Bhargav Baaskaran 999c24d78d Converted more parser tests to baselines
- Converted CSharpAutoCompleteTest
2018-06-25 11:43:17 -07:00
Ajay Bhargav Baaskaran b821ce8b8e First step in converting parser tests to use baselines
- Added the necessary infrastructure to serialize and verify the syntax
tree
- Updated ParserVisitor to be overrideable
- Made CSharpVerbatimBlockTest to use baselines
2018-06-19 15:57:05 -07:00
N. Taylor Mullen 41fad8a33a Don't smart indent code inside of Razor block constructs.
- Prior to this change we weren't strict enough with where our smart indenter ran. We made the assumption that every code block could be smart indented and then Roslyn would "do the right thing". However, in nested code block scenarios we found that Roslyn and us would both indent resulting in extra newlines. These changes make the criteria for applying smart indentation a little stricter.
- Updated directive code block parsing to add a C# marker symbol in cases of an empty code block directive.
- Added unit tests to verify new smart indenter behavior.
- Updated existing tests to expect new syntax tree marker symbol for empty directive bits.
- Regenerated baselines.

#2410
2018-06-18 20:38:01 -07:00
N. Taylor Mullen 1aa15374b5 Add partial parsing of `@functions` directive body.
- Added ability to understand valid inserts, deletes and replacements for the `@functions` directive (and any other directive that uses our extensible code block bits).
- Added unit tests.
- Updated existing tests.
- Found an issue when completing some C# items the auto-completions would impact the underlying snapshot after we'd captured the change. Fixed this by forcing a reparse when we detect that our understanding of the latest snapshot and the actual latest snapshot diverge.

#2408
2018-06-18 17:11:40 -07:00
Ryan Nowak af63afdae7 Add partial parsing for parenthesis
- This is part of a fix for #1255 - this change enables signature help in implicit expressions by improving the partial parsing. We're now smart enough about the contents of an implicit expression and attempt to balance parenthesis to determine if we should not full parse.

#1255
2018-06-15 11:22:03 -07:00
Ajay Bhargav Baaskaran 6270c1f47e Merge branch 'rel/vs15.7' into dev 2018-04-05 16:28:17 -07:00
Ryan Nowak 4cd24a2b08 Add experimental flag to un-special-case data-
This change allows blazor to opt into treating data- attributes the same
way as normal attributes in the parser.
2018-04-05 15:27:04 -07:00
N. Taylor Mullen c874f84c3d Revert "Revert "Make Razor HTML Comments aware (#2178)""
This reverts commit 1f3f4b79da.
2018-03-20 15:23:53 -07:00
N. Taylor Mullen 1f3f4b79da Revert "Make Razor HTML Comments aware (#2178)"
This reverts commit b58986414e.
2018-03-20 11:54:09 -07:00
Ajay Bhargav Baaskaran c934bd08ac Merge branch 'rel/vs15.7' into release/2.1 2018-03-19 19:14:51 -07:00
Ajay Bhargav Baaskaran 9dc7c65205 Fix: Missing Html intellisense after directives 2018-03-19 17:16:11 -07:00
Artak b58986414e
Make Razor HTML Comments aware (#2178)
* Merging changes (from dev branch; doing manually to squash them really)of HTML Parser to be aware of HTML Comments so TagHelpers don't complain about comments as content.
2018-03-19 10:18:29 -07:00
Artak Mkrtchyan ae94c3c452
- Updated naming for methods to be more intuitive.
- Added extra tests for clarity
- Added extra comments to clarify complex areas
2018-03-09 18:18:16 -08:00
Artak Mkrtchyan 3e22c16930
Added extra tests for non-covered scenarios:
- For older version of Razor the HTML comments will be complained about by TahHelperRewriter
- RazorParserFeatureFlags tests now ensure that AllowHtmlCommentsInTagHelpers is true in 2.1 version  and false in older versions
- Added extra test for IsHtmlCommentAhead to make sure Razor code transition is allowed in comment tag
- Moved the unallowed html comment ending to a static array.
2018-03-09 17:18:57 -08:00
Artak Mkrtchyan e8eb3b7b1c
Added extra test to cover extra dash in closing comment 2018-03-09 11:52:23 -08:00
Artak Mkrtchyan 6c8c6a777c
- Clarified the code where the comment content ending is checked to be allowed or not.
- Added more unit tests
2018-03-09 09:16:17 -08:00
Artak Mkrtchyan faccd90aa5
Added unit-tests to validate new methods 2018-03-08 16:36:56 -08:00
Artak Mkrtchyan 32e2c533c7
Naming improvements and test code cleanup 2018-03-08 13:37:05 -08:00
Artak Mkrtchyan 632c9dead7
Added tests for the LookaheadUntil method 2018-03-08 13:37:05 -08:00
Artak Mkrtchyan 33814fb634
Updated the Comments detection to comply with HTML 5 specification 2018-03-08 13:37:04 -08:00
Artak Mkrtchyan 6885fb15d0
Updated the test TagHelperBlockRewriteTest class 2018-03-08 13:37:04 -08:00
Artak Mkrtchyan 6f515bb763
Fixed all the tests to reflect HtmlComment block type support 2018-03-08 13:37:03 -08:00
Artak Mkrtchyan e1fbea24f1
HtmlMarkupParser is now aware of HtmlComment blocks. Majority (if not all, will confirm soon) tests have been updated to account for HtmlComment blocks. 2018-03-08 13:37:03 -08:00
Artak Mkrtchyan ad8485addd
Added new BlockType - HtmlComment
Updated the HtmlMarkupParser to understand the HtmlCOmments, and treat those as blocks.
2018-03-08 13:37:03 -08:00