Giter Club home page Giter Club logo

roslyndom's People

Contributors

arudnitsky avatar bjoeris avatar mrjul avatar olegtarasov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roslyndom's Issues

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.

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.

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

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

Comments not preserved

User comments that are not public annotations should be preserved into output

Structured documentation - XML comments - should not be considered comments

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.

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

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

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

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.

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

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.