Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
amanuel2 committed Jun 8, 2024
1 parent 250213a commit 32ac645
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
cmake_minimum_required(VERSION 3.0)

# Built using Clang 🐐
set(CMAKE_CXX_COMPILER_ID "Clang")
set(CMAKE_C_COMPILER_ID "Clang")

# Find the Clang compiler
find_program(CMAKE_CXX_COMPILER NAMES clang++ clang++-14 clang++-13 clang++-12 clang++-11 clang++-10 clang++-9 clang++-8 clang++-7 clang++-6.0 clang++)
find_program(CMAKE_C_COMPILER NAMES clang clang-14 clang-13 clang-12 clang-11 clang-10 clang-9 clang-8 clang-7 clang-6.0 clang)

# Double Check
if(NOT CMAKE_CXX_COMPILER)
message(FATAL_ERROR "Clang++ not found")
endif()

if(NOT CMAKE_C_COMPILER)
message(FATAL_ERROR "Clang not found")
endif()

project(RiftLang)

# C++17 for now might switch to 20
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ add_executable(
riftlang
${SOURCES}
)
target_compile_options(riftlang PRIVATE -Wpedantic -Wall -Wextra -Werror)
target_compile_options(riftlang PRIVATE -Wpedantic -Wall -Wextra -Werror -Wmisleading-indentation)

4 changes: 3 additions & 1 deletion lib/scanner/scanner.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#include <scanner/scanner.hh>
#include <unordered_map>

typedef rift::scanner::tokens::Token Token;
typedef rift::scanner::tokens::Type Type;
Expand Down Expand Up @@ -125,7 +126,8 @@ namespace rift
default:
if (isDigit(c)) num();
else if (isAlpha(c)) identifier();
else rift::error::report(line, "scanToken", "Unorthodox Character");break;
else rift::error::report(line, "scanToken", "Unorthodox Character");
break;
};
}
}
Expand Down

0 comments on commit 32ac645

Please sign in to comment.