Playing with https://github.com/catprintlabs/crow
which originally only parses into the AST tree, but does no semantic analysis.
I need to add the semantic analysis stuff, but when I try to require the appropriate files, i get this when I compile the app:
Showing last frame. Use --error-trace for full trace.
In /usr/local/Cellar/crystal/0.32.1/src/llvm/lib_llvm.cr:4:19
4 | `[ -n "$LLVM_CONFIG" ] && command -v "$LLVM_CONFIG" || \
^
Error: error executing command: [ -n "$LLVM_CONFIG" ] && command -v "$LLVM_CONFIG" || command -v llvm-config-8 || command -v llvm-config-8.0 || command -v llvm-config80 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 8.0*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-7 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 7.1*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-7.0 || command -v llvm-config70 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 7.0*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-6.0 || command -v llvm-config60 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 6.0*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-5.0 || command -v llvm-config50 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 5.0*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-4.0 || command -v llvm-config40 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 4.0*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-3.9 || command -v llvm-config39 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.9*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-3.8 || command -v llvm-config38 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.8*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config
, got exit status 1
Here is the set of requires originally:
require “compiler/crystal/syntax/virtual_file.cr”
require “compiler/crystal/syntax/exception.cr”
require “compiler/crystal/syntax/parser.cr”
require “logger”
as soon as I add:
require “compiler/crystal/program.cr”
or (anything else to do with the require tree for semantic processing) I get the above error.