is_keyword_token


is_keyword_token(s)
      

Return true if the symbol s is a Slogan keyword, otherwise return false.

Examples:


let t = stream_tokenizer(false, string_reader("let a = 100 * 20"))

is_keyword_token(get_token(t)) // read `let`
// true
let tok = get_token(t) // read `a`
is_keyword_token(tok)
// false
is_valid_identifier(tok)
// true
tok = get_token(t) // read `=`
is_keyword_token(tok)
// false
is_special_token(tok)
// true
special_token_to_string(tok) == "="
// true
eval(expression(t)) // read and evaluate `100*20`g
// 2000
      

Also see:

statement
slogan


Core Module Index | Main Index