Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #31 from OkayX6/develop

fixes #29
  • Loading branch information...
commit 6ae2da41f06e49909dd22811bc272778bad6d45f 2 parents 58e5b9b + ced0f90
@nesteruk nesteruk authored
View
10 src/fsharper/Psi.FSharp/src/Parsing/Tokens.xml
@@ -64,6 +64,13 @@
<Keyword name="WHILE_KEYWORD" representation="while"/>
<Keyword name="WITH_KEYWORD" representation="with"/>
<Keyword name="YIELD_KEYWORD" representation="yield"/>
+
+ <!-- Computation expression keywords -->
+ <Keyword name="LET_BANG_KEYWORD" representation="let!" />
+ <Keyword name="USE_BANG_KEYWORD" representation="use!" />
+ <Keyword name="DO_BANG_KEYWORD" representation="do!" />
+ <Keyword name="YIELD_BANG_KEYWORD" representation="yield!" />
+ <Keyword name="RETURN_BANG_KEYWORD" representation="return!" />
<!-- ML keywords -->
<Keyword name="ASR_ML_KEYWORD" representation="asr"/>
@@ -116,7 +123,7 @@
<Keyword name="FLOAT_KEYWORD" representation="float"/>
<Keyword name="DOUBLE_KEYWORD" representation="double"/>
<Keyword name="SBYTE_KEYWORD" representation="sbyte"/>
- <Keyword name="BYTE_KEYWORD" representation="byte"/>type
+ <Keyword name="BYTE_KEYWORD" representation="byte"/>
<Keyword name="INT16_KEYWORD" representation="int16"/>
<Keyword name="UINT16_KEYWORD" representation="uint16"/>
<Keyword name="INT32_KEYWORD" representation="int32"/>
@@ -205,6 +212,5 @@
<Token name="DPERCENT_OP" representation="%%"/>
<Token name="BQ_BQ" representation="``"/>
<Token name="RESERVED" representation=""/>
-
<Token name="UNDERSCORE" representation="_"/>
</Tokens>
View
2  src/fsharper/Psi.FSharp/src/fsharp.psi
@@ -123,7 +123,7 @@ qualifiedValueName options{hasSemanticInterface; customInterface; customImpl; cu
fieldReference options {hasSemanticInterface; customImpl; customInterface;
stubBase = "JetBrains.ReSharper.Psi.FSharp.Impl.Tree.ReferenceBase";}
:
- (
+ (
moduleReference<QUALIFIER, Qualifier, type = "semantic">
DOT<FSHARP_DOT, Dot>
)?
View
7 src/fsharper/Tests/FSharpLexerTest.cs
@@ -15,9 +15,11 @@ public void TestLexer(string file)
// ReSharper disable StringLiteralTypo
private readonly string[] files = new[]
{
+ "do-bang",
"let-arith-1",
"let-array-1",
"let-array-2",
+ "let-bang",
"let-list-1",
"let-list-2",
"let-list-3",
@@ -40,10 +42,12 @@ public void TestLexer(string file)
"open-directive-2",
"open-directive-3",
"raise",
+ "return-bang",
"test1",
"union-type-1",
"union-type-2-generic-recursive",
"union-type-3-generic-recursive",
+ "use-bang",
"active-patterns-multi-case",
"active-patterns-one-case",
"active-patterns-parameterized",
@@ -53,7 +57,8 @@ public void TestLexer(string file)
"identifier-double-backstick-3",
"verbatim-string-escape-double-quote",
"verbatim-string-escape",
- "verbatim-string-simple",
+ "verbatim-string-simple",
+ "yield-bang"
};
// ReSharper restore StringLiteralTypo
}
View
1  test/data/lexing/fsharp/do-bang.fs
@@ -0,0 +1 @@
+do! f 0
View
5 test/data/lexing/fsharp/do-bang.fs.gold
@@ -0,0 +1,5 @@
+DO_BANG_KEYWORD
+WHITE_SPACE
+IDENTIFIER
+WHITE_SPACE
+INT_LITERAL
View
1  test/data/lexing/fsharp/let-bang.fs
@@ -0,0 +1 @@
+let! x = 0
View
7 test/data/lexing/fsharp/let-bang.fs.gold
@@ -0,0 +1,7 @@
+LET_BANG_KEYWORD
+WHITE_SPACE
+IDENTIFIER
+WHITE_SPACE
+EQUALS
+WHITE_SPACE
+INT_LITERAL
View
1  test/data/lexing/fsharp/return-bang.fs
@@ -0,0 +1 @@
+return! 0
View
3  test/data/lexing/fsharp/return-bang.fs.gold
@@ -0,0 +1,3 @@
+RETURN_BANG_KEYWORD
+WHITE_SPACE
+INT_LITERAL
View
1  test/data/lexing/fsharp/use-bang.fs
@@ -0,0 +1 @@
+use! x = f ()
View
10 test/data/lexing/fsharp/use-bang.fs.gold
@@ -0,0 +1,10 @@
+USE_BANG_KEYWORD
+WHITE_SPACE
+IDENTIFIER
+WHITE_SPACE
+EQUALS
+WHITE_SPACE
+IDENTIFIER
+WHITE_SPACE
+LPAREN
+RPAREN
View
1  test/data/lexing/fsharp/yield-bang.fs
@@ -0,0 +1 @@
+yield! recFun ()
View
6 test/data/lexing/fsharp/yield-bang.fs.gold
@@ -0,0 +1,6 @@
+YIELD_BANG_KEYWORD
+WHITE_SPACE
+IDENTIFIER
+WHITE_SPACE
+LPAREN
+RPAREN
Please sign in to comment.
Something went wrong with that request. Please try again.