Skip to content

Commit

Permalink
Fix #540: Dot character should not be an error char in C#
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbylight committed Apr 14, 2024
1 parent ae5ef4e commit 45dfcd7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ OperatorOrPunctuator = ({OOPHelper1}|{OOPHelper2}|{OOPHelper3}|{OOPHelper4}|
/* NOTE: We distinguish between operators and separators (punctuators), but */
/* the C# spec doesn't, so the stuff below isn't in the spec. */
Separator = ([\{\}\[\]\(\)])
Separator2 = ([,;])
Separator2 = ([,;.])

/* C.1.10 - Pre-processing Directives. */
/* NOTE: We don't do ALL of the PP stuff here as it's unnecessary */
Expand Down
7 changes: 3 additions & 4 deletions RSyntaxTextArea/src/main/java/org/fife/ui/rsyntaxtextarea/modes/CSharpTokenMaker.java
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* 06/05/2016
*
* This library is distributed under a modified BSD license. See the included
Expand Down Expand Up @@ -193,6 +193,17 @@ void testHexLiterals() {
}


@Test
void testIdentifiers() {
assertAllTokensOfType(TokenTypes.IDENTIFIER,
"Foobar",
",",
".",
";"
);
}


@Test
void testKeywords() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private JMenuBar createMenuBar() {
addSyntaxItem("6502 Assembler", "Assembler6502.txt", SYNTAX_STYLE_ASSEMBLER_6502, bg, menu);
addSyntaxItem("ActionScript", "ActionScriptExample.txt", SYNTAX_STYLE_ACTIONSCRIPT, bg, menu);
addSyntaxItem("C", "CExample.txt", SYNTAX_STYLE_C, bg, menu);
addSyntaxItem("C#", "CSharpExample.txt", SYNTAX_STYLE_CSHARP, bg, menu);
addSyntaxItem("CSS", "CssExample.txt", SYNTAX_STYLE_CSS, bg, menu);
addSyntaxItem("Dockerfile", "DockerfileExample.txt", SYNTAX_STYLE_DOCKERFILE, bg, menu);
addSyntaxItem("Go", "GoExample.txt", SYNTAX_STYLE_GO, bg, menu);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;

namespace HelloWorld
{
class Program
{
// Program entry point
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

0 comments on commit 45dfcd7

Please sign in to comment.