Giter Site home page Giter Site logo

C# Scanner about coderay HOT 11 OPEN

rubychan avatar rubychan commented on July 18, 2024
C# Scanner

from coderay.

Comments (11)

sloncho avatar sloncho commented on July 18, 2024

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.

from coderay.

korny avatar korny commented on July 18, 2024

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

from coderay.

sloncho avatar sloncho commented on July 18, 2024

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.

from coderay.

korny avatar korny commented on July 18, 2024

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

from coderay.

sloncho avatar sloncho commented on July 18, 2024

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?

from coderay.

emperor-ming avatar emperor-ming commented on July 18, 2024

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

from coderay.

thegcat avatar thegcat commented on July 18, 2024

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.

from coderay.

ganaware avatar ganaware commented on July 18, 2024

I have wrote another C# scanner: #186

from coderay.

matee911 avatar matee911 commented on July 18, 2024

👍

from coderay.

emperador-ming avatar emperador-ming commented on July 18, 2024

Great news!

from coderay.

ganaware avatar ganaware commented on July 18, 2024

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.

from coderay.

Related Issues (20)

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.