Commit Graph

704 Commits

Author SHA1 Message Date
Ryan Nowak 9cefcdd450 Add legacy dependencies of C# lowering 2016-12-04 23:30:34 -08:00
Ryan Nowak 03549bb542 Add end-to-end support for extensible directives
This change adds a way to actually configure the RazorEngine to use
extensible directives (previously buried behind legacy API). As part of
this feature adds the RazorParserOptions class to encapsulate anything
else that becomes a parser options (ahem taghelpers).

Now we have a pattern for this when we get there.

Options are propagated as part of the RazorSyntaxTree for
testability/sanity and this was actually responsible for the bulk of the
changes.

Also added some extension methods for adding directives to the
IRazorEngineBuilder and an end to end integration test.
2016-12-03 18:44:54 -08:00
Ryan Nowak 46018f9512 Add IR phase
This change adds a phase which runs IR passes. Design and code are almost
exactly the same as the existing SyntaxTree phase. However all of this is
public because the IR is public API.
2016-11-29 21:28:27 -08:00
N. Taylor Mullen 518378f499 Add extensible directive abstractions
- Based generic directive implementation off of descriptors.
- Added parsing logic to consume descriptors and parse content that's expected.
- Added parsing errors to automagically detect unexpected directive pieces.
- Updated visitor implementations to understand the directive bits.
- Added a builder abstraction to easily create descriptors. Had to maintain the ability to manually construct a descriptor to enable convenient serialization/deserialization.
- Added tests/comparers to verify correctness of parsing.

#853
2016-11-23 19:56:40 -08:00
N. Taylor Mullen 522f6e969d Pin global.json SDK to 1.0.0-preview2-1-003177. 2016-11-23 15:58:35 -08:00
N. Taylor Mullen 47769c1626 Fix visit chunk generator naming. 2016-11-22 16:44:08 -08:00
N. Taylor Mullen cf7489e600 Port WhiteSpaceRewriter and ConditionalAttributeCollapser.
- Add an `HtmlNodeOptimizationPass` that does all of the `RazorSyntaxTreeRewriting` that legacy used to achieve outside of `TagHelper`s.
- Add tests for `HtmlNodeOptimizationPass` to verify it's executing appropriate bits.

#849
2016-11-22 12:04:31 -08:00
N. Taylor Mullen aa58ea6907 Change IR implementations to not hold all information in children.
- Added conditional attribute test.
- Reacted to Html optimization pass in tests.
- Removed directive IR bits since they'll be handled by the extensible directive system.

#844
2016-11-22 11:54:13 -08:00
Ryan Nowak d8b626c843 Implement IR lowering phase
This is a first cut of IR lowering and includes the basic node types and
some tests.
2016-11-22 11:25:23 -08:00
N. Taylor Mullen d0e1b810c4 Fix test case so it works cross plat.
- This just happened to be working on Windows. Newlines!
2016-11-21 14:52:52 -08:00
N. Taylor Mullen 6c8ef157b4 Add TagHelper binding abstractions.
- Added a TagHelperFeature to hold TagHelper specific pieces that can be replaced.
- Built a syntax tree pass that applies the ported TagHelper bits.
- Updated tests that expected different RazorEngine defaults.
- Added new tests to verify binder pass.
2016-11-21 11:04:42 -08:00
N. Taylor Mullen 26a1cf3cff Port existing TagHelper infrastructure.
- Modified how tests are run to reflect our new test infrastructure.
- Added TagHelper assertion bits.
- Moved all classes to the Evolution.Legacy namespace.
- Copied Test.Sources bits to the Evolution.Test project.

#845
2016-11-21 11:01:10 -08:00
N. Taylor Mullen 51fb0c993b Add indexability to the RazorSourceDocument.
- Removed the `CreateReader` API in favor of a `CopyTo`, `Length`, `[index]` and `Encoding`.
- Updated existing APIs to react to the change.
- Added tests.
2016-11-21 10:58:09 -08:00
Nate McMaster 8171a25079
Clean tmp folder after unzipping KoreBuild 2016-11-18 10:56:58 -08:00
Pranav K 03cf0d3528 Remove makefile.shade 2016-11-16 14:44:09 -08:00
N. Taylor Mullen 2b77446326 Update sln to reflect changed testing project. 2016-11-16 14:33:25 -08:00
N. Taylor Mullen dbcb690120 Update Razor.Evolution versions and package verifier. 2016-11-16 14:21:52 -08:00
Pranav K 1562865ca6 Add RazorProject - an abstraction for working with Razor files in a project
Fixes #842
2016-11-16 14:06:03 -08:00
Ryan Nowak d42a4c84a1 Rename IR* -> RazorIR* 2016-11-16 14:06:03 -08:00
Ryan Nowak d40f6d3151 Add abstractions for Razor IR
This is an API skeleton for the IR data model that we'll be using as a
spiritual continuation of the 'chunks' API. Currently missing a lot of
detail which will be filled in as needed.
2016-11-16 14:06:02 -08:00
Ryan Nowak b74ea5d74e Fix failing tests 2016-11-16 14:06:02 -08:00
Ryan Nowak b341340d1f Add skeleton of syntax phases 2016-11-16 14:06:01 -08:00
Ryan Nowak 49d3574677 Make tests public - xUnit requires this 2016-11-16 14:06:01 -08:00
N. Taylor Mullen d06e5b6002 Add legacy parser 2016-11-16 14:06:00 -08:00
Ryan Nowak 6b9b75841f Add Razor Evolution Engine and primitives 2016-11-16 14:05:58 -08:00
Pranav K 43caef488c Use IsTeamCity to determine if we're running on the CI 2016-11-16 14:05:58 -08:00
Pranav K 3b5a0db512 Push packages as part of invoking verify on the feed 2016-11-16 14:05:57 -08:00
Pranav K 06106dd392 Publish feeds to aspnetcore-feature-work 2016-11-16 14:05:57 -08:00
N. Taylor Mullen 17f3e3bbab Initial project skeleton for Razor Evolution 2016-11-16 14:05:57 -08:00
Pranav K c746fd81df Updating versions to 1.2.0-* 2016-11-09 14:19:11 -08:00
Pranav K e738b5ca7b Merge branch 'rel/1.1.0' into dev 2016-11-09 11:32:49 -08:00
Pranav K e0023a965c Branching for 1.1.0 2016-11-09 11:32:47 -08:00
jacalvar eaa273701b Updated baselines to remove Debug only members 2016-11-08 15:22:47 -08:00
jacalvar b9e58a4fe6 Created public API baselines 2016-11-08 11:05:35 -08:00
Piotr ff8b2260fb Update CSharpCodeParser.cs (#860)
Cleanup CSharpCodeParser.cs code.
2016-11-07 14:34:10 -08:00
Jass Bagga 77ed9f22fc Moved location of and modified CaseSensitiveTagHelperAttributeComparer
Addresses Mvc https://github.com/aspnet/Mvc/issues/5323
2016-11-01 14:47:13 -07:00
Pranav K 9741bdad3d Merge remote-tracking branch 'origin/rel/1.1.0-preview1' into dev 2016-10-17 09:56:31 -07:00
Pranav K a6f7416f35 Branching for 1.1.0-preview1 2016-10-17 09:49:37 -07:00
Pranav K d449e87795 Downgrading tool to netcoreapp1.0 2016-10-13 14:12:52 -07:00
Pranav K 8a057d5491 Updating to netcoreapp1.1 2016-10-13 11:23:50 -07:00
Pranav K 7bc3d440bd Revert "Updating to netcoreapp1.1"
This reverts commit c17540f02c.
2016-10-12 16:09:28 -07:00
Pranav K c17540f02c Updating to netcoreapp1.1 2016-10-12 13:46:19 -07:00
Pranav K 039e1021a4 Updating partner package versions 2016-09-28 11:51:56 -07:00
Pavel Krymets bdbb854bdb Use TaskCache class from Microsoft.Extensions.TaskCache.Sources (#829)
Instead of Task.FromResult(0)
2016-09-07 14:53:06 -07:00
Doug Bunting aa3bcc32df Increase .travis.yml consistency between repos
- aspnet/Universe#349
- minimize `dotnet` setup time; no need for caching
- `MONO_THREADS_PER_CPU` env variable isn't relevant since we aren't running Mono tests
- no need for icu4c w/ current `dotnet` builds
2016-09-04 20:07:36 -07:00
Pranav K 5944dd6f87 Small perf fixes to improve precompilation times 2016-09-01 09:44:30 -07:00
Crystal Qian d19845730f Added a copy constructor for tag helper descriptors. (#827) 2016-08-31 15:38:35 -07:00
Crystal Qian 0e1a54ef4f Removed unnecessary dependency. 2016-08-30 17:14:28 -07:00
Crystal Qian bb5a70f9a8 Added a check for property bag in tag helper descriptor comparer.
Modified TagHelperDescriptorComparer to reflect changes made in #822.
2016-08-30 09:53:45 -07:00
Kiran Challa cdb1a1a343 Moving RazorPageGenerator from 'tools' to 'src' as we want this package to be published by CI
(This tool is referenced in Hosting and Diagnostics)
2016-08-29 11:29:28 -07:00