Preprocessing writes the intermediate output to *.preprocessed files. This makes debugging various DSL syntax errors much easier since the line number in the error corresponds to the line numbers in these files.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
# Preprocesses the give file using GCC. This script is usually automatically called in
|
||||
# ./compile.sh, but may be called also individually for debugging purposes.
|
||||
cat $1 | gcc ${@:2} -x c -E - | sed "s/#.*//g"
|
||||
cat $1 | gcc ${@:2} -x c -E - | sed "s/#.*//g" | tee ${PWD}/$(basename -- "$1").preprocessed
|
||||
|
Reference in New Issue
Block a user