diff options
author | Mike Krüger <mkrueger@novell.com> | 2009-10-08 20:04:42 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2009-10-08 20:04:42 +0400 |
commit | 04474b07b6a6c1183dc35dd092c91a198650a720 (patch) | |
tree | 50e2c0cf5813a8023df26078a908827b4550355a /main/contrib | |
parent | 0eab84cdbe4c17c6a52181ad8ace0bfe0b91bd01 (diff) |
* NRefactory.csproj:
* Src/Parser/gen.sh:
* Src/Parser/CSharp/CSharpParser.cs: Fixed 'Bug 545291 - wrong inline
compilation errors when using nullable'.
svn path=/trunk/monodevelop/; revision=143779
Diffstat (limited to 'main/contrib')
4 files changed, 23 insertions, 2 deletions
diff --git a/main/contrib/NRefactory/Project/ChangeLog b/main/contrib/NRefactory/Project/ChangeLog index 614378b8bf..056de86e75 100644 --- a/main/contrib/NRefactory/Project/ChangeLog +++ b/main/contrib/NRefactory/Project/ChangeLog @@ -1,3 +1,10 @@ +2009-10-08 Mike Krüger <mkrueger@novell.com> + + * NRefactory.csproj: + * Src/Parser/gen.sh: + * Src/Parser/CSharp/CSharpParser.cs: Fixed 'Bug 545291 - wrong + inline compilation errors when using nullable'. + 2009-10-07 Lluis Sanchez Gual <lluis@novell.com> * Configuration/AssemblyInfo.cs: Bump MD version. diff --git a/main/contrib/NRefactory/Project/NRefactory.csproj b/main/contrib/NRefactory/Project/NRefactory.csproj index 4ab12ada87..2c0dffc436 100644 --- a/main/contrib/NRefactory/Project/NRefactory.csproj +++ b/main/contrib/NRefactory/Project/NRefactory.csproj @@ -132,6 +132,7 @@ <Compile Include="Src\Ast\TypeReference.cs" />
<Compile Include="Src\Parser\VBNet\ParamModifierList.cs" />
<Compile Include="Src\Visitors\NodeTrackingAstVisitor.cs" />
+ <None Include="Src\Parser\gen.sh" />
</ItemGroup>
<ItemGroup>
<Content Include="Src\Lexer\CSharp\KeywordList.txt" />
diff --git a/main/contrib/NRefactory/Project/Src/Parser/CSharp/CSharpParser.cs b/main/contrib/NRefactory/Project/Src/Parser/CSharp/CSharpParser.cs index 4881f3a2b2..d69ba1497f 100644 --- a/main/contrib/NRefactory/Project/Src/Parser/CSharp/CSharpParser.cs +++ b/main/contrib/NRefactory/Project/Src/Parser/CSharp/CSharpParser.cs @@ -456,14 +456,19 @@ namespace ICSharpCode.NRefactory.Parser.CSharp if (IsYieldStatement ()) { return false; } - + if ((Tokens.TypeKW[la.kind] && Peek (1).kind != Tokens.Dot) || la.kind == Tokens.Void) { return true; } StartPeek (); Token pt = la; - return IsTypeNameOrKWForTypeCast (ref pt) && IsIdentifierToken (pt) && Peek (1).kind != Tokens.Question; + bool result = IsTypeNameOrKWForTypeCast (ref pt) && IsIdentifierToken (pt); + if (Peek (1).kind == Tokens.Question) { + result &= Peek (2).kind == Tokens.Identifier; + result &= Peek (3).kind == Tokens.Semicolon || Peek (3).kind == Tokens.Comma || Peek (3).kind == Tokens.Assign; + } + return result; } /* True if lookahead is a type argument list (<...>) followed by diff --git a/main/contrib/NRefactory/Project/Src/Parser/gen.sh b/main/contrib/NRefactory/Project/Src/Parser/gen.sh new file mode 100755 index 0000000000..2925baa421 --- /dev/null +++ b/main/contrib/NRefactory/Project/Src/Parser/gen.sh @@ -0,0 +1,8 @@ +#!/bin/sh +echo Generating with coco +set CRFRAMES = "Frames" +cp CSharp/cs.ATG Frames/cs.ATG +mono Frames/SharpCoco.exe -namespace ICSharpCode.NRefactory.Parser.CSharp Frames/cs.ATG +mv Frames/Parser.cs CSharp/Parser.cs + +#mono Frames/SharpCoco.exe -trace GIPXA -namespace ICSharpCode.NRefactory.Parser.VB VBNet/VBNET.ATG |