Skip to content

Commit

Permalink
Switch naming to Sand
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed Jul 31, 2020
1 parent a800741 commit 4cc7c9b
Show file tree
Hide file tree
Showing 101 changed files with 3,111 additions and 3,111 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:
run: cmake --build . --config $BUILD_TYPE --parallel 10

- name: Compress files
run: tar -czf xenon-macos-binaries.tar.gz std bin/xen examples internal
run: tar -czf sand-macos-binaries.tar.gz std bin/sand examples internal

- name: Upload the artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: xenon-macos-binaries.tar.gz
asset_name: xenon-${{ github.event.release.tag_name }}-macos-binaries.tar.gz
asset_path: sand-macos-binaries.tar.gz
asset_name: sand-${{ github.event.release.tag_name }}-macos-binaries.tar.gz
asset_content_type: application/tar+gzip

build-and-release-ubuntu:
Expand Down Expand Up @@ -80,16 +80,16 @@ jobs:
run: cmake --build . --config $BUILD_TYPE --parallel 10

- name: Compress files
run: tar -czf xenon-ubuntu-binaries.tar.gz std bin/xen examples internal
run: tar -czf sand-ubuntu-binaries.tar.gz std bin/sand examples internal

- name: Upload the artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: xenon-ubuntu-binaries.tar.gz
asset_name: xenon-${{ github.event.release.tag_name }}-ubuntu-binaries.tar.gz
asset_path: sand-ubuntu-binaries.tar.gz
asset_name: sand-${{ github.event.release.tag_name }}-ubuntu-binaries.tar.gz
asset_content_type: application/tar+gzip

build-windows:
Expand Down Expand Up @@ -122,18 +122,18 @@ jobs:
shell: powershell
run: cmake --build . --config Release

- name: Move bin/Release/xen.exe to bin/xen.exe
run: mv -Force "$env:GITHUB_WORKSPACE/bin/Release/xen.exe" "$env:GITHUB_WORKSPACE/bin/xen.exe"
- name: Move bin/Release/sand.exe to bin/sand.exe
run: mv -Force "$env:GITHUB_WORKSPACE/bin/Release/sand.exe" "$env:GITHUB_WORKSPACE/bin/sand.exe"

- name: Compress files
run: 7z a -y xenon-windows-binaries.zip std bin/xen.exe examples internal
run: 7z a -y sand-windows-binaries.zip std bin/sand.exe examples internal

- name: Upload the artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: xenon-windows-binaries.zip
asset_name: xenon-${{ github.event.release.tag_name }}-windows-binaries.zip
asset_path: sand-windows-binaries.zip
asset_name: sand-${{ github.event.release.tag_name }}-windows-binaries.zip
asset_content_type: application/zip
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
cmake_policy(VERSION 3.2)

project(xen
project(sand
VERSION "1.0.1"
DESCRIPTION "Xenon compiler"
DESCRIPTION "Sand compiler"
)

set(CMAKE_CXX_STANDARD 17)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# **Sand** Programming Language
- [Official documentation](https://xenon-lang.github.io/documentation)
- [Official documentation](https://sand-lang.github.io/documentation)
- [Discord server](https://discord.gg/sb5hRzW)
File renamed without changes.
8 changes: 4 additions & 4 deletions include/Xenon/Alias.hpp → include/Sand/Alias.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <Xenon/Name.hpp>
#include <Xenon/NameArray.hpp>
#include <Sand/Name.hpp>
#include <Sand/NameArray.hpp>

namespace Xenon
namespace Sand
{
class Alias : public Name
{
Expand All @@ -13,4 +13,4 @@ class Alias : public Name

Alias(const std::string &name, NameArray *names_) : Name(name), names(names_) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <Xenon/Value.hpp>
#include <Sand/Value.hpp>

#include <string>

namespace Xenon
namespace Sand
{
enum class AssemblyConstraintModifier
{
Expand All @@ -24,4 +24,4 @@ struct AssemblyOperand

AssemblyOperand(const AssemblyConstraintModifier &type_, const std::string &name_, Value *expression_) : type(type_), name(name_), expression(expression_) {}
};
} // namespace Xenon
} // namespace Sand
6 changes: 3 additions & 3 deletions include/Xenon/Attributes.hpp → include/Sand/Attributes.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#pragma once

#include <Xenon/Environment.hpp>
#include <Sand/Environment.hpp>

#include <string>
#include <unordered_map>
#include <vector>

namespace Xenon
namespace Sand
{
class Attributes
{
Expand Down Expand Up @@ -73,4 +73,4 @@ class Attributes
return this->accept_current_target_os() && this->accept_current_target_arch();
}
};
} // namespace Xenon
} // namespace Sand
10 changes: 5 additions & 5 deletions include/Xenon/Block.hpp → include/Sand/Block.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#pragma once

#include <Xenon/Name.hpp>
#include <Xenon/StatementStatus.hpp>
#include <Xenon/Value.hpp>
#include <Sand/Name.hpp>
#include <Sand/StatementStatus.hpp>
#include <Sand/Value.hpp>

#include <llvm/IR/IRBuilder.h>

#include <string>

namespace Xenon
namespace Sand
{
class Block : public Name
{
Expand Down Expand Up @@ -51,4 +51,4 @@ class Block : public Name
builder.CreateCondBr(value->get_ref(), this->get_ref(), false_block->get_ref());
}
};
} // namespace Xenon
} // namespace Sand
4 changes: 2 additions & 2 deletions include/Xenon/Compiler.hpp → include/Sand/Compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <string>
#include <vector>

namespace Xenon
namespace Sand
{
class Compiler
{
Expand All @@ -19,4 +19,4 @@ class Compiler

std::vector<std::string> generate_objects(const std::string &os, const std::string &arch, const llvm::PassBuilder::OptimizationLevel &optimization_level);
};
} // namespace Xenon
} // namespace Sand
4 changes: 2 additions & 2 deletions include/Xenon/Debugger.hpp → include/Sand/Debugger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string>
#include <unordered_map>

namespace Xenon
namespace Sand
{
class Debugger
{
Expand Down Expand Up @@ -41,4 +41,4 @@ class Debugger
return this->out;
}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#pragma once

#include <Xenon/Debugger.hpp>
#include <Sand/Debugger.hpp>

#include <llvm/IR/IRBuilder.h>

#include <whereami.h>

#include <Xenon/filesystem.hpp>
#include <Sand/filesystem.hpp>

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#define CURRENT_OS "windows"
Expand All @@ -18,7 +18,7 @@
#define CURRENT_OS "unknown"
#endif

namespace Xenon
namespace Sand
{
class Environment
{
Expand Down Expand Up @@ -87,4 +87,4 @@ class Environment
return fs::absolute(bin.append(".." DIRECTORY_SEPARATOR "std"));
}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#include <exception>
#include <string>

#include <Xenon/filesystem.hpp>
#include <Sand/filesystem.hpp>

#include "antlr4-runtime.h"

namespace Xenon
namespace Sand
{
class CompilationException : public std::exception
{
Expand Down Expand Up @@ -45,4 +45,4 @@ fs::path source;
return ss.str();
}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Sand/Exceptions/CompilationException.hpp>

namespace Xenon
namespace Sand
{
class ExpressionHasNotClassTypeException : public CompilationException
{
public:
ExpressionHasNotClassTypeException(const fs::path &source, antlr4::Token *token) : ExpressionHasNotClassTypeException(source, token, token->getText()) {}
ExpressionHasNotClassTypeException(const fs::path &source, antlr4::Token *token, const std::string &text) : CompilationException(source, "Expression has not class type: " + text, token) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Sand/Exceptions/CompilationException.hpp>

namespace Xenon
namespace Sand
{
class FileNotFoundException : public std::exception
{
Expand All @@ -15,4 +15,4 @@ class ImportException : public CompilationException
ImportException(const fs::path &source, antlr4::Token *token) : ImportException(source, token, token->getText()) {}
ImportException(const fs::path &source, antlr4::Token *token, const std::string &text) : CompilationException(source, "Import failed: " + text, token) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Xenon/Type.hpp>
#include <Sand/Exceptions/CompilationException.hpp>
#include <Sand/Type.hpp>

namespace Xenon
namespace Sand
{
class IndexException : public CompilationException
{
public:
IndexException(const fs::path &source, antlr4::Token *token, Type *index_type, Type *type) : CompilationException(source, "Invalid index of type '" + index_type->to_string() + "' on type: '" + type->to_string() + "'", token) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Sand/Exceptions/CompilationException.hpp>

namespace Xenon
namespace Sand
{
class InvalidInputConstraintException : public CompilationException
{
public:
InvalidInputConstraintException(const fs::path &source, antlr4::Token *token) : InvalidInputConstraintException(source, token, token->getText()) {}
InvalidInputConstraintException(const fs::path &source, antlr4::Token *token, const std::string &text) : CompilationException(source, "Invalid range: " + text + "(must be a class implementing .begin() and .end())", token) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Sand/Exceptions/CompilationException.hpp>

namespace Xenon
namespace Sand
{
class InvalidLeftValueException : public CompilationException
{
public:
InvalidLeftValueException(const fs::path &source, antlr4::Token *token) : InvalidLeftValueException(source, token, token->getText()) {}
InvalidLeftValueException(const fs::path &source, antlr4::Token *token, const std::string &text) : CompilationException(source, "Invalid left-value: " + text, token) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Sand/Exceptions/CompilationException.hpp>

namespace Xenon
namespace Sand
{
class InvalidRangeException : public CompilationException
{
public:
InvalidRangeException(const fs::path &source, antlr4::Token *token) : InvalidRangeException(source, token, token->getText()) {}
InvalidRangeException(const fs::path &source, antlr4::Token *token, const std::string &text) : CompilationException(source, "Invalid range: " + text + "(must be a class implementing .begin() and .end())", token) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Sand/Exceptions/CompilationException.hpp>

namespace Xenon
namespace Sand
{
class InvalidRightValueException : public CompilationException
{
public:
InvalidRightValueException(const fs::path &source, antlr4::Token *token) : InvalidRightValueException(source, token, token->getText()) {}
InvalidRightValueException(const fs::path &source, antlr4::Token *token, const std::string &text) : CompilationException(source, "Invalid right-value: " + text, token) {}
};
} // namespace Xenon
} // namespace Sand
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <Xenon/Exceptions/CompilationException.hpp>
#include <Sand/Exceptions/CompilationException.hpp>

namespace Xenon
namespace Sand
{
class InvalidTypeException : public CompilationException
{
public:
InvalidTypeException(const fs::path &source, antlr4::Token *token) : InvalidTypeException(source, token, token->getText()) {}
InvalidTypeException(const fs::path &source, antlr4::Token *token, const std::string &text) : CompilationException(source, "Invalid type: " + text, token) {}
};
} // namespace Xenon
} // namespace Sand
Loading

0 comments on commit 4cc7c9b

Please sign in to comment.