Méthode | Description | |
---|---|---|
BraceHandler ( TokenStream |
||
GetCloseCurlyBraceIndentSize ( RToken closeCurlyBraceToken, |
Given closing curly brace tries to find keyword that is associated with the scope and calculate indentation based on the keyword line.
|
|
GetMatchingBraceToken ( RTokenType tokenType ) : RTokenType | ||
GetOpenCurlyBraceIndentSize ( RToken openCurlyBraceToken, |
Given opening curly brace tries to find keyword that is associated with the scope and calculate indentation based on the keyword line.
|
|
HandleBrace ( ) : void | ||
IsInArguments ( ) : bool |
Tells if scope is opening inside function or indexer arguments and hence user indentation of curly braces must be respected.
|
Méthode | Description | |
---|---|---|
AssociateKeywordPositionWithOpenBrace ( RToken openBrace, int keywordPosition ) : void |
Associates keyword with the open brace. Used when formatter needs to determine indentation level of the new formatting scope when it encounters { token. Closing curly indentation is defined by the line that either holds the opening curly brace or the line that holds keyword that defines the expression that the curly belongs to. Examples: x <- function(a) { } x <- function(a) { } First keyword is associated with the open brace, then, when brace pair closes, association is propagated to the closing brace and then to the opening curly. When curly pair closes formatter then finds appropriate indentation based on the line that contains the keyword token. |
|
AssociateKeywordPositionWithToken ( RToken source, RToken target ) : void |
Propagates keyword association to the target token. AssociateKeywordPositionWithOpenBrace
|
|
GetNearestNonWhitespaceIndex ( ) : int | ||
TryPopMatchingBrace ( RToken token ) : RToken |
public BraceHandler ( TokenStream |
||
tokens | TokenStream |
|
tb | ||
Résultat | System |
public GetCloseCurlyBraceIndentSize ( RToken closeCurlyBraceToken, |
||
closeCurlyBraceToken | RToken | |
tb | ||
options | Microsoft.R.Core.Formatting.RFormatOptions | |
Résultat | int |
public static GetMatchingBraceToken ( RTokenType tokenType ) : RTokenType | ||
tokenType | RTokenType | |
Résultat | RTokenType |
public GetOpenCurlyBraceIndentSize ( RToken openCurlyBraceToken, |
||
openCurlyBraceToken | RToken | |
tb | ||
options | Microsoft.R.Core.Formatting.RFormatOptions | |
Résultat | int |