13clangFormat = sys.argv[2]
14fetchClangFormat = sys.argv[3]
17exeSuffix =
'.exe' if sys.platform.startswith(
'win')
else '';
20 subprocess.check_output([sksllex, src +
"/sksl/lex/sksl.lex",
"Lexer",
21 "Token", src +
"/sksl/SkSLLexer.h", src +
22 "/sksl/SkSLLexer.cpp"])
24 if not os.path.isfile(clangFormat + exeSuffix):
25 subprocess.check_call([sys.executable, fetchClangFormat]);
27 subprocess.check_call(clangFormat +
" -i \"" + src +
"/sksl/SkSLLexer.h\"",
29 subprocess.check_call(clangFormat +
" -i \"" + src +
30 "/sksl/SkSLLexer.cpp\"", shell=
True)
31except subprocess.CalledProcessError
as err:
32 print(
"### Lexer error:")
def print(*args, **kwargs)