Comments (11)
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.
So, a bug report for a pull request ^^ Does Joshua Galvez have a GitHub account so we can inform him?
from coderay.
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.
You're right, the error does seem to result from incompatiblity.
from coderay.
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.
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.
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.
I have wrote another C# scanner: #186
from coderay.
👍
from coderay.
Great news!
from coderay.
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)
- Could the API for CodeRay.scan(dataset, :python).term also allow for some variant that works on the file extension? (e. g. "rb" for ruby files, "py" or python files etc..)
- ActionView::Template::Error (Symbol or String expected, but NilClass given.)
- Elixir Scanner HOT 1
- Regex with slashes are broken for Javascript
- add 1C Enterprise syntax
- Placeholder $ character in prepared statements (SQL) is marked invalid
- Misaligned line numbers in diff files with `line_numbers: :inline` HOT 1
- Install coderay with permission error in macosx HOT 1
- Invalid rdoc option in gemspec
- CodeRay hangs on multi-code in content
- Add support for CakePHP ctp template
- Support for Kotlin
- Coderay breaks with embedded backticks
- Uninitialized constant Coderay (Redmine 4.1)
- $ method in Groovy code is highlighted as error
- ruby 3.0: test/unit/suite.rb fails due to change in flatten behavior for subclass of Array
- Support for C#
- Support for GraphQL
- License? HOT 1
- Can we easily redefine the colours? HOT 1
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.
from coderay.