MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / calculate_safe_location

Function calculate_safe_location

crates/gitql-parser/src/parser.rs:4005–4010  ·  view source on GitHub ↗
(tokens: &[Token], position: usize)

Source from the content-addressed store, hash-verified

4003
4004#[inline(always)]
4005pub(crate) fn calculate_safe_location(tokens: &[Token], position: usize) -> SourceLocation {
4006 if position < tokens.len() {
4007 return tokens[position].location;
4008 }
4009 tokens[tokens.len() - 1].location
4010}
4011
4012#[inline(always)]
4013pub(crate) fn is_logical_or_operator(tokens: &[Token], position: &usize) -> bool {

Callers 15

parse_do_queryFunction · 0.85
parse_set_queryFunction · 0.85
parse_describe_queryFunction · 0.85
parse_show_queryFunction · 0.85
parse_select_queryFunction · 0.85
parse_select_statementFunction · 0.85
parse_from_optionFunction · 0.85
parse_where_statementFunction · 0.85
parse_having_statementFunction · 0.85
parse_qualify_statementFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…