// Token: 0x06000B43 RID: 2883 RVA: 0x00035E50 File Offset: 0x00034050 private void AppendMember(List <SyntaxHighlighter.TokenBuffer> statement) { for (int i = 0; i < statement.Count; i++) { SyntaxHighlighter.TokenBuffer tokenBuffer = statement[i]; this.AppendWhitespace(tokenBuffer.StartIndex); if (tokenBuffer.Token == Token.IDENTIFIER) { string @string = tokenBuffer.GetString(this.tokenizer); if (TypeExtensions.IsCSharpKeyword(@string)) { this.Colorize(@string, SyntaxHighlighter.KeywordColor); } else { Token token = (i + 1 < statement.Count) ? statement[i + 1].Token : Token.UNKNOWN; if (token != Token.UNKNOWN && (token == Token.SIMPLE_ASSIGNMENT || token == Token.SEMI_COLON || token == Token.SCOPE_BEGIN || token == Token.LEFT_PARENTHESIS || token == Token.COMMA)) { this.Append(@string); } else { this.Colorize(@string, SyntaxHighlighter.IdentifierColor); } } this.textPosition = tokenBuffer.EndIndex; } else { this.AppendToken(tokenBuffer); } } }
// Token: 0x06000B44 RID: 2884 RVA: 0x00035F1C File Offset: 0x0003411C private void AppendImplementation(List <SyntaxHighlighter.TokenBuffer> statement) { for (int i = 0; i < statement.Count; i++) { SyntaxHighlighter.TokenBuffer tokenBuffer = statement[i]; this.AppendWhitespace(tokenBuffer.StartIndex); if (tokenBuffer.Token == Token.IDENTIFIER) { string @string = tokenBuffer.GetString(this.tokenizer); if (TypeExtensions.IsCSharpKeyword(@string)) { this.Colorize(@string, SyntaxHighlighter.KeywordColor); } else { this.result.Append(@string); } this.textPosition = tokenBuffer.EndIndex; } else { this.AppendToken(tokenBuffer); } } }
// Token: 0x06000B42 RID: 2882 RVA: 0x00035DD4 File Offset: 0x00033FD4 private void AppendDeclaration(List <SyntaxHighlighter.TokenBuffer> statementBuffer, ref int prevIndex) { for (int i = 0; i < statementBuffer.Count; i++) { SyntaxHighlighter.TokenBuffer tokenBuffer = statementBuffer[i]; this.AppendWhitespace(tokenBuffer.StartIndex); if (tokenBuffer.Token == Token.IDENTIFIER) { string @string = tokenBuffer.GetString(this.tokenizer); if (TypeExtensions.IsCSharpKeyword(@string)) { this.Colorize(@string, SyntaxHighlighter.KeywordColor); } else { this.Colorize(@string, SyntaxHighlighter.IdentifierColor); } prevIndex = tokenBuffer.EndIndex; } else { this.AppendToken(tokenBuffer); } } }
// Token: 0x06000B45 RID: 2885 RVA: 0x00035FA0 File Offset: 0x000341A0 private void AppendToken(SyntaxHighlighter.TokenBuffer buffer) { this.AppendWhitespace(buffer.StartIndex); Token token = buffer.Token; switch (token) { case Token.SIGNED_INT32: case Token.UNSIGNED_INT32: case Token.SIGNED_INT64: case Token.UNSIGNED_INT64: case Token.FLOAT32: case Token.FLOAT64: case Token.DECIMAL: this.Colorize(buffer.StartIndex, buffer.Length, SyntaxHighlighter.LiteralColor); goto IL_1BE; case Token.IDENTIFIER: { string text = this.tokenizer.ExpressionString.Substring(buffer.StartIndex, buffer.Length); if (TypeExtensions.IsCSharpKeyword(text)) { this.Colorize(text, SyntaxHighlighter.KeywordColor); goto IL_1BE; } this.Colorize(text, SyntaxHighlighter.IdentifierColor); goto IL_1BE; } case Token.SIZEOF: break; case Token.CHAR_CONSTANT: case Token.STRING_CONSTANT: this.Colorize(buffer.StartIndex, buffer.Length, SyntaxHighlighter.StringLiteralColor); goto IL_1BE; case Token.LOGICAL_OR: case Token.LOGICAL_AND: goto IL_19A; case Token.EOF: return; default: switch (token) { case Token.TRUE: case Token.FALSE: case Token.RELATIONAL_IS: case Token.RELATIONAL_AS: case Token.NEW: case Token.THIS: case Token.BASE: case Token.CHECKED: case Token.UNCHECKED: case Token.DEFAULT: case Token.NULL: case Token.TYPEOF: case Token.VOID: case Token.REF: case Token.OUT: case Token.IN: case Token.CLASS: case Token.STRUCT: case Token.INTERFACE: case Token.RETURN: break; case Token.NUMBERED_EXPRESSION_ARGUMENT: case Token.UNNUMBERED_EXPRESSION_ARGUMENT: case Token.NAMED_EXPRESSION_ARGUMENT: case Token.NULL_COALESCE: case Token.INCREMENT: case Token.DECREMENT: case Token.MEMBER_ACCESS_POINTER_DEREFERENCE: case Token.ELEMENT_ACCESS_NULL_CONDITIONAL: case Token.MEMBER_ACCESS_NULL_CONDITIONAL: case Token.DELEGATE: case Token.SCOPE_BEGIN: case Token.SCOPE_END: case Token.PREPROCESSOR: goto IL_19A; case Token.COMMENT: this.Colorize(buffer.StartIndex, buffer.Length, SyntaxHighlighter.CommentColor); goto IL_1BE; default: goto IL_19A; } break; } this.Colorize(buffer.StartIndex, buffer.Length, SyntaxHighlighter.KeywordColor); goto IL_1BE; IL_19A: this.result.Append(this.tokenizer.ExpressionString, buffer.StartIndex, buffer.Length); IL_1BE: this.textPosition = buffer.EndIndex; }