def pump.BeautifyCode | ( | string | ) |
def pump.ConvertFromPumpSource | ( | src_text | ) |
def pump.Eof | ( | ) |
def pump.FindFirst | ( | lines, | |
token_table, | |||
cursor | |||
) |
def pump.FindFirstInLine | ( | line, | |
token_table | |||
) |
def pump.IsHeaderGuardIncludeOrOneLineIWYUPragma | ( | line | ) |
def pump.IsInPreprocessorDirective | ( | prev_lines, | |
cur_line | |||
) |
def pump.IsMultiLineIWYUPragma | ( | line | ) |
def pump.IsSingleLineComment | ( | cur_line | ) |
def pump.MakeToken | ( | lines, | |
start, | |||
end, | |||
token_type | |||
) |
def pump.ParseAtomicCodeNode | ( | tokens | ) |
def pump.ParseCodeNode | ( | tokens | ) |
def pump.ParseElseNode | ( | tokens | ) |
def pump.ParseExpNode | ( | token | ) |
def pump.ParseExpTokenInParens | ( | lines, | |
pos | |||
) |
def pump.ParseToAST | ( | pump_src_text | ) |
def pump.ParseToken | ( | lines, | |
pos, | |||
regex, | |||
token_type | |||
) |
def pump.PeekToken | ( | a_list | ) |
def pump.PopFront | ( | a_list | ) |
def pump.PopToken | ( | a_list, | |
token_type = None |
|||
) |
def pump.PushFront | ( | a_list, | |
elem | |||
) |
def pump.RStripNewLineFromToken | ( | token | ) |
def pump.RunAtomicCode | ( | env, | |
node, | |||
output | |||
) |
def pump.RunCode | ( | env, | |
code_node, | |||
output | |||
) |
def pump.SkipUntil | ( | lines, | |
pos, | |||
regex, | |||
token_type | |||
) |
def pump.StartsWith | ( | lines, | |
pos, | |||
string | |||
) |
def pump.StripMetaComments | ( | str | ) |
def pump.SubString | ( | lines, | |
start, | |||
end | |||
) |
def pump.Tokenize | ( | s | ) |
def pump.TokenizeLines | ( | lines, | |
pos | |||
) |
def pump.WrapCode | ( | line, | |
line_concat, | |||
output | |||
) |
def pump.WrapComment | ( | line, | |
output | |||
) |
def pump.WrapLongLine | ( | line, | |
output | |||
) |
def pump.WrapPlainCode | ( | line, | |
output | |||
) |
def pump.WrapPreprocessorDirective | ( | line, | |
output | |||
) |
string pump::__author__ = 'wan@google.com (Zhanyong Wan)' |
tuple pump::DOT_DOT_REGEX = re.compile(r'\.\.') |
tuple pump::EQ_REGEX = re.compile(r'=') |
tuple pump::ID_REGEX = re.compile(r'[_A-Za-z]\w*') |
tuple pump::OPTIONAL_WHITE_SPACES_REGEX = re.compile(r'\s*') |
tuple pump::REST_OF_LINE_REGEX = re.compile(r'.*?(?=$|\$\$)') |
list pump::TOKEN_TABLE |
00001 [ 00002 (re.compile(r'\$var\s+'), '$var'), 00003 (re.compile(r'\$elif\s+'), '$elif'), 00004 (re.compile(r'\$else\s+'), '$else'), 00005 (re.compile(r'\$for\s+'), '$for'), 00006 (re.compile(r'\$if\s+'), '$if'), 00007 (re.compile(r'\$range\s+'), '$range'), 00008 (re.compile(r'\$[_A-Za-z]\w*'), '$id'), 00009 (re.compile(r'\$\(\$\)'), '$($)'), 00010 (re.compile(r'\$'), '$'), 00011 (re.compile(r'\[\[\n?'), '[['), 00012 (re.compile(r'\]\]\n?'), ']]'), 00013 ]
tuple pump::WHITE_SPACE_REGEX = re.compile(r'\s') |