Function isTokenPrecededByTags [src]
Prototype
pub fn isTokenPrecededByTags( tree: *const Ast, ti: TokenIndex, expected_token_tags: []const Token.Tag, ) bool
Parameters
tree: *const Ast
ti: TokenIndex
expected_token_tags: []const Token.Tag
Source
pub fn isTokenPrecededByTags(
tree: *const Ast,
ti: TokenIndex,
expected_token_tags: []const Token.Tag,
) bool {
return std.mem.endsWith(
Token.Tag,
tree.tokens.items(.tag)[0..ti],
expected_token_tags,
);
}