roslyndom's People
Forkers
dmikov herskinduk printscharming pottereric codecadwallader amadeusw huangweitao jmarolf modulexcite colin-gourlay jackwangcumt drarsalan bogdanbujdea thinhils yyl-20020115 ridgewroslyndom's Issues
Support aliases in using statements
Several people say they use this "only when they have to"
Have to is stronger than "want to"
Peter Ritchie has an interesting use case here: https://github.com/peteraritchie/LongPath
Switch property from direct statement to accessor support
Changing properties to accessors will support scope, attributes and public annotations on individual accessors
This also improves the hierarchy as seen in ancestors and descendant and avoids commingling statements in those features.
Provide support for using statements
Recognize complex literal expressions as literal expressions
To a human, expressions that are comprised only of literals are literal expressions.
But perhaps these are so rare that it doesn't matter.
Provide support for end of line comments
Recognize object initialization expressions
Log or otherwise report diagnostics
Determine a way to communicate the diagnostics supplied by the .NET Compiler Platform
Nested type naming not correct
Nested type naming, the outer name features is currently broken and the tests set to inconclusive.
The mechanism for this was changed, probably, to use the upcoming ancestors feature and fixing this is delayed until that feature is done.
Provide support for continue statements
Provide support for preprocessor directive conditionals (#if)
Provide support for LINQ statements
Formatting issues - vertical whitespace
These tests are failing because of extra or missing vertical whitespace
Can_get_members_with_comments_and_whitespace_from_statementContainer
Can_get_members_with_comments_and_whitespace_from_typeContainer
Can_get_members_with_comments_and_whitespace_from_stemContainer
Lots of errors in PublicAnnotation.cs
Error 1 Invalid token '(' in class, struct, or interface member declaration C:\NewCode\RoslynDOM-master\RoslynDomCommon\PublicAnnotation.cs 7 34 RoslynDomCommon
Error 2 { expected C:\NewCode\RoslynDOM-master\RoslynDomCommon\PublicAnnotation.cs 7 34 RoslynDomCommon
Error 3 ; expected C:\NewCode\RoslynDOM-master\RoslynDomCommon\PublicAnnotation.cs 7 46 RoslynDomCommon
Error 4 Invalid token '{' in class, struct, or interface member declaration C:\NewCode\RoslynDOM-master\RoslynDomCommon\PublicAnnotation.cs 8 5 RoslynDomCommon
Error 5 Invalid token '=' in class, struct, or interface member declaration C:\NewCode\RoslynDOM-master\RoslynDomCommon\PublicAnnotation.cs 16 37 RoslynDomCommon
Error 6 Invalid token ';' in class, struct, or interface member declaration C:\NewCode\RoslynDOM-master\RoslynDomCommon\PublicAnnotation.cs 16 43 RoslynDomCommon
Provide support for throw statements
Evaluate commonality between variables, parameters and possibly fields
Within local blocks of code there is no real difference between variables and parameters. They should probably have a common interface to facilitate searching
Open design issue:
Intuitively I think fields are different, but I can't justify that at present. Not sure where to draw the line - feels like slippery slope. If the concept is accessible symbols in the current file, then why not properties, and if I do all changeable symbols in the file, why not all changeable symbols.
This decision may be impacted by class using statements in C# 6
Provide a list of all directives under a node
Comments not preserved
User comments that are not public annotations should be preserved into output
Structured documentation - XML comments - should not be considered comments
Provide support for break statements
Provide support for arrays in return type declaration
Methods and properties
Enum members not supported
While this needs to be done at some point, it is not considered critical while only single files are loaded.
The common case is that enums are in separate files, and these files just would not be evaluated.
Recognize literal expressions
Make else a separate entity
Else statements are currently part of the If block (ElseStatements)
This was done because there is no sane syntax node to attach.
However, this mucks with the ancestors /descendants tree so must be chagned
Support for checked blocks
Provide support for try/catch blocks
Provide support for arrays in parameters
Support for lock blocks
Descendants
Need the ability to retrieve an IEnumerable holding all descendants
Assignement parsing exception
Hello,
When parsing a property assignment I have an exception because the latter assigns a static variable in another class.
A little the test to reproduce the issue.
[TestMethod]
[TestCategory(TypedSymbolCategory)]
public void Can_parse_for_property()
{
var csharpCode = @"
public class MyClass
{
protected int _flotDialogue
{
get { return MyStaticClass1._flotDialogue; }
set { MyStaticClass1._flotDialogue = value; }
}
}";
var root = RDomCSharpFactory.Factory.GetRootFromString(csharpCode);
var symbol = ((RDomProperty)root.Classes.First().Properties.First()).TypedSymbol as IPropertySymbol;
Assert.IsNotNull(symbol);
Assert.AreEqual("myProperty", symbol.Name);
}
In this case the left part of RDomAssignmentStatementFactory is an MemberAccessExpressionSyntax
I'm don't show exactly how to fix that properly.
Thanks
Miguel
If statements are expanded during load/unload (whitespace issue)
Whitespace is added after all brackets
This is particularly annoying after if statements
Enum values are not yet supported
Enums, but not their values are currently supported
Methods do not support type parameters
Whitespace messed up in output (whitespace removed0
- User whitespace and other trivia not stored on load
- BuildSyntax uses the overly brutal NormalizeWhitespace method to reestablish whitespace
The result is losing user whitespace and creating whitespace that is sometimes bizarre.
This fix will break a number of tests which should be reset when this issue is fixed.
EDIT: Adding whitespace is moved to another issue and this issue renamed
Supply Report property on all IDom items
Major goal is to make debugging easier.
Consider parameter to report current location, parents, children, or detail.
Crash in certain situation with block syntax
The test "Can_load_block_statements_for_method" is crashing on on format.
Provide support for labeled statements and goto
Someone needs to convince me support is appropriate. I'm not trying to build the full version of Roslyn as that remains available.
If I implement this, it will probably be garbage in/garbage out parroting of the statements in their location. That doesn't seem to add value, so I need a scenario, if one exists, that will help design this feature.
Provide support for unsafe and fixed keywords
Unless I find a scenario, not planning to add this complexity
It would be easy enough to supply a block with an unsafe characteristic, similar to the upcoming using, checked and lock blocks, and to barf back out a fixed keyword. However, I don't see value in that and need scenarios, if they exist, that will help design this feature.
My current feeling is that if you are using this feature, you might be comfortable in the full Roslyn version. This might change with compelling code generation scenarios.
Namespaces output nothing on BuildSyntax
Serious bug slipped through.
Tests and code updated
Provide support for regions
PublicAnnotations are inconsistent in behavior
If you give a bad name to the GetValue methods, you get the default value for the requested type, or null for the untyped version of the method. However, if you give a bad key to these methods, you get an exception. Have requested input from Jim on this to see how it affects RoslynDomProvider.
Support for empty statements
These are statements that comprised of a simple semi-colon.
Occasionally used to indicate a no-op in a conditional
Add TryGetValue to PublicAnnotationList/PublicAnnotations
Fixed
Check diagnostics on load
Consider a boolean passed to the load process that will throw exception on diagnostic issue. You would often not want to continue if you knew code couldn't be compiled
Crash when type contains no members
If a type contains no members, which is legal and occasionally useful to do, RoslynDom crashes.
Ancestors feature
Need the ability to retrieve an IEnumerable holding all ancestors
Diifferentiate code block containers from logical code containers
There is currently an IStatementContainer which includes blocks like loops as well as methods/property accessors
There is an IPropertyOrMethod interface for IStatic, accessibility, etc. But this can't hold statements because it is the property accessor that holds the statements and most of the characteristics.
I don't want to just use IMethod because this would include some inappropriate thing like separate static and abstract indicators.
I don't like either IMethodOrAccessor or ICodeContainer. I could rename IStatementContainer to IStatementBlock and then use IStatementContainer for this new feature.
Crashes on load with typo in property
Code that includes at least the following typos crashes on load
public string Foo{getX; set;}
public string Foo(get; set; } // note parens
These should load and report diagnostic issues - at least a bool syntax failure
New ToString override
Current override is pretty much useless,
Particularly, this is used in debugging
Structured documentation not preserverd
Structured documentation - XML comments - should be available in a language agnostic way and reproduced on output
Support for alternate assignment operators +=, etc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.