Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

Commit

Permalink
Made whitespace/comment behavior more configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
G. Roggemans committed May 20, 2016
1 parent 1eb5aab commit 813d1d7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/compiler.bash
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ compiler.compile() {
IFS=$'\n'

msg.bold "Compiling $file_name"
echo "$EC_COMMENT Compiled by Ellipsis-Compiler on $(date)" > "$target"
if [ -z "$EC_NOHEADER" ]; then
echo "$EC_COMMENT Compiled by Ellipsis-Compiler on $(date)" > "$target"
fi
compiler.parse_file "$file"

# Move temp target to final destination
Expand Down Expand Up @@ -258,8 +260,10 @@ compiler.parse_line() {
# Remove commented lines
elif [[ "$line" =~ ^[[:space:]]*"$EC_COMMENT".* ]] ||\
[[ "$line" =~ ^$ ]]; then
# Ignore commented and empty lines
:
# Keep comments if configured
if [ -n "$EC_PWS" ]; then
echo "$line" >> "$target"
fi
# Add normal lines to the output
elif "$output"; then
echo "$line" >> "$target"
Expand Down

0 comments on commit 813d1d7

Please sign in to comment.