镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

C# Scanner #54

Open
Open

Description

@nathany

Someone has written a start to c# support here: http://www.redmine.org/boards/3/topics/11616 - Joshua Galvez


Thanks Joshua! The C# scanner Joshua mentioned was created and posted by me.

For I don't have enough knowledge on Ruby, I only made small modifications on the Java scanner carefully to make it work with C#.

Because I don't know how to set up a standalone environment for developing for the latest version Coderay, I just worked in the Redmine environment. As a result, I could only use an old version of the Java scanner to start with, but not the latest version.

The version of Coderay in Redmine current trunk is now 0.7.6.227, quite an old version, lacking of quite a lot of new features.

  • percy li

From Redmine: http://odd-eyed-code.org/issues/78

Activity

  1. sloncho commented on Jan 21, 2013

    @sloncho

    I have tried this scanner, and it works ok, but unfortunately it breaks with a simple case:

    public void TestCode()
    {
       Console.WriteLine("breaks here");
    }
    It produces this error:
    
    ***ERROR in scanner.rb:200:in `tokenize': Unknown token content type: :open, kind = :string (after 0 tokens)
    tokens:
    current line: 3  column: 23  pos: 47
    matched: "\""  state: "Error in CodeRay::Scanners::CSharp#scan_tokens, initial state was: nil"
    bol? = false,  eos? = false
    surrounding code:
    "ode()\n{\n   Console.WriteLine(\""  ~~  "breaks here\");\n}\n"
    ***ERROR***
    

    Unfortunately, I'm not a Ruby dev, so I could not really locate the problem. Any help will be highly appreciated.

  2. korny commented on Jan 21, 2013

    @korny
    Member

    So, a bug report for a pull request ^^ Does Joshua Galvez have a GitHub account so we can inform him?

  3. sloncho commented on Jan 21, 2013

    @sloncho

    Hmmm, I just read the "current" java scanner. It's a lot different than this old code. I guess it'll need a total rewrite in order to be used with the current coderay.

  4. korny commented on Jan 21, 2013

    @korny
    Member

    You're right, the error does seem to result from incompatiblity.

  5. sloncho commented on Jan 21, 2013

    @sloncho

    As I'm not ruby dev, but have very good knowledge of c#, how can I help modifying the existing java scanner to create a new c# one?

  6. emperor-ming commented on Jan 23, 2013

    @emperor-ming

    Ey, dudes! It will be great to have a scanner of C# (we use it intensively in Redmine environment).
    Thanks for trying sloncho!

  7. thegcat commented on Jul 4, 2013

    @thegcat

    There's a scanner for C# attached to http://www.redmine.org/boards/3/topics/11616#message-37780 that should work with Coderay 1.0.x, I haven't tried it though.

  8. ganaware commented on Aug 17, 2015

    @ganaware

    I have wrote another C# scanner: #186

  9. matee911 commented on Aug 21, 2015

    @matee911

    👍

  10. emperador-ming commented on Aug 21, 2015

    @emperador-ming

    Great news!

  11. ganaware commented on Aug 24, 2015

    @ganaware

    There are some bugs, so I withdraw this request #186 .

    I'm now fixing bugs in https://github.com/ganaware/coderay/tree/csharp-scanner ,
    and testing in https://github.com/ganaware/coderay-scanner-tests/tree/csharp-scanner .

    Please try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions