diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/KeywordList.txt b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/KeywordList.txt index c66a191f9a..de9ea16e45 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/KeywordList.txt +++ b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/KeywordList.txt @@ -201,7 +201,7 @@ KCCTypeDeclarationStart("public", "internal", @TypeDeclarationKW, @KCCClassModif KCCMemberVisibilityModifiers("protected", "private", "public", "internal") SimpleTypeName(@TypeKW, @IdentifierTokens, "void") GlobalLevel("namespace", "using", @KCCTypeDeclarationStart) -ExpressionStart("base", "delegate", "false", "new", "null", "sizeof", "this", "true", "typeof", "checked", "unchecked", "from") +ExpressionStart("base", "delegate", "false", "new", "null", "sizeof", "this", "true", "typeof", "checked", "unchecked", "from", "default") ExpressionContent("as", "is", "out", "ref", "in") # interfaces cannot have inner classes etc., the only keyword (expect for type names) that may appear in them is "event" InterfaceLevel("event") diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs index 05142245e9..d1a9a6ad3e 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs @@ -183,7 +183,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp public static BitArray KCCMemberVisibilityModifiers = NewSet(Protected, Private, Public, Internal); public static BitArray SimpleTypeName = NewSet(Char, Bool, Object, String, Sbyte, Byte, Short, Ushort, Int, Uint, Long, Ulong, Float, Double, Decimal, Identifier, Partial, Where, Get, Set, Add, Remove, Yield, Select, Group, By, Into, From, Ascending, Descending, Orderby, Let, Join, On, Equals, Void); public static BitArray GlobalLevel = NewSet(Namespace, Using, Public, Internal, Class, Interface, Struct, Enum, Delegate, Abstract, Sealed, Static, Unsafe, Partial); - public static BitArray ExpressionStart = NewSet(Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From); + public static BitArray ExpressionStart = NewSet(Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From, Default); public static BitArray ExpressionContent = NewSet(As, Is, Out, Ref, In); public static BitArray InterfaceLevel = NewSet(Event); public static BitArray TypeLevel = NewSet(Public, Internal, Class, Interface, Struct, Enum, Delegate, Abstract, Sealed, Static, Unsafe, Partial, Protected, Private, Public, Internal, Const, Event, Explicit, Extern, Fixed, Implicit, New, Operator, Override, Readonly, Virtual, Volatile);