public Token(EnumTab classe, string lexema, int linha, int coluna) { this.classe = classe; this.lexema = lexema; this.linha = linha; this.coluna = coluna; }
public Boolean eat(EnumTab tab) { if (token.classe == tab) { avancar(); return(true); } return(false); }
static public EnumTab <T>[] MakeTabsFromEnum <T>(params T[] values) where T : struct, IEnumerable { int count = values.Length; var tabs = new EnumTab <T> [count]; for (int i = 0; i < count; i++) { tabs[i] = new EnumTab <T>(values[i].ToString(), values[i]); } return(tabs); }
static public EnumTab <T>[] MakeTabsFromEnum <T>() where T : struct, IEnumerable { var labels = Enum.GetNames(typeof(T)); int count = labels.Length; var tabs = new EnumTab <T> [count]; for (int i = 0; i < count; i++) { tabs[i] = new EnumTab <T>(labels[i], (T)Enum.Parse(typeof(T), labels[i])); } return(tabs); }
internal unsafe LineServicesCallbacks() { _pfnFetchRunRedefined = new FetchRunRedefined(this.FetchRunRedefined); _pfnFetchLineProps = new FetchLineProps(this.FetchLineProps); _pfnFetchPap = new FetchPap(this.FetchPap); _pfnGetRunTextMetrics = new GetRunTextMetrics(this.GetRunTextMetrics); _pfnGetRunCharWidths = new GetRunCharWidths(this.GetRunCharWidths); _pfnGetDurMaxExpandRagged = new GetDurMaxExpandRagged(this.GetDurMaxExpandRagged); _pfnDrawTextRun = new DrawTextRun(this.DrawTextRun); _pfnGetGlyphsRedefined = new GetGlyphsRedefined(this.GetGlyphsRedefined); _pfnGetGlyphPositions = new GetGlyphPositions(this.GetGlyphPositions); _pfnGetAutoNumberInfo = new GetAutoNumberInfo(this.GetAutoNumberInfo); _pfnDrawGlyphs = new DrawGlyphs(this.DrawGlyphs); _pfnGetObjectHandlerInfo = new GetObjectHandlerInfo(this.GetObjectHandlerInfo); _pfnGetRunUnderlineInfo = new GetRunUnderlineInfo(this.GetRunUnderlineInfo); _pfnGetRunStrikethroughInfo = new GetRunStrikethroughInfo(this.GetRunStrikethroughInfo); _pfnHyphenate = new Hyphenate(this.Hyphenate); _pfnGetNextHyphenOpp = new GetNextHyphenOpp(this.GetNextHyphenOpp); _pfnGetPrevHyphenOpp = new GetPrevHyphenOpp(this.GetPrevHyphenOpp); _pfnDrawUnderline = new DrawUnderline(this.DrawUnderline); _pfnDrawStrikethrough = new DrawStrikethrough(this.DrawStrikethrough); _pfnFInterruptShaping = new FInterruptShaping(this.FInterruptShaping); _pfnGetCharCompressionInfoFullMixed = new GetCharCompressionInfoFullMixed(this.GetCharCompressionInfoFullMixed); _pfnGetCharExpansionInfoFullMixed = new GetCharExpansionInfoFullMixed(this.GetCharExpansionInfoFullMixed); _pfnGetGlyphCompressionInfoFullMixed = new GetGlyphCompressionInfoFullMixed(this.GetGlyphCompressionInfoFullMixed); _pfnGetGlyphExpansionInfoFullMixed = new GetGlyphExpansionInfoFullMixed(this.GetGlyphExpansionInfoFullMixed); _pfnEnumText = new EnumText(this.EnumText); _pfnEnumTab = new EnumTab(this.EnumTab); }