Class CSharpParser
- Namespace
- SunamoDevCode
- Assembly
- SunamoDevCode.dll
Parser for C# code, specifically for handling const declarations.
public class CSharpParser
- Inheritance
-
CSharpParser
- Inherited Members
- Extension Methods
Fields
PublicModifier
Public modifier keyword with trailing space.
public const string PublicModifier = "public "
Field Value
StaticReadonlyModifier
Static readonly modifier keywords with trailing space.
public const string StaticReadonlyModifier = "static readonly "
Field Value
Methods
ParseConsts(List<string>, out int)
Parses const declarations from lines, tracking the first occurrence index.
public static List<string> ParseConsts(List<string> lines, out int first)
Parameters
linesList<string>Lines of C# code to parse.
firstintOutput parameter for the index of the first const declaration found.
Returns
ParseConstsAllLines(List<string>)
Parses const declarations from all lines without filtering.
public static List<string> ParseConstsAllLines(List<string> lines)
Parameters
Returns
RemoveConsts(string, List<string>)
Directly save to file In A2 will be what can't be deleted, when will be > 0, ThrowException
public static Task RemoveConsts(string file, List<string> remove)