Large cleanup
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2019-07-25 17:23:54 +02:00
parent e639a2c170
commit e2a0c35992
58 changed files with 700 additions and 539 deletions

View File

@@ -1,4 +1,3 @@
#include <utility>
#include <cmath>
#include <unordered_map>
#include <sstream>
@@ -175,7 +174,7 @@ namespace Porygon::Parser {
this->Next();
has_point = true;
decimal_index = 0;
float_value = int_value;
float_value = (double) int_value;
length++;
continue;
default:
@@ -296,7 +295,7 @@ namespace Porygon::Parser {
u16string s = this->_scriptString.substr(start + 1, end - start);
std::basic_ostringstream<char16_t> stream;
for (int i = 0; i < s.size(); i++) {
for (size_t i = 0; i < s.size(); i++) {
c = s[i];
if (c == '\\') {
i++;

View File

@@ -1,4 +1,3 @@
#include <utility>
#include <algorithm>
#include "Parser.hpp"
#include "ParsedStatements/ParsedStatement.hpp"

View File

@@ -1,6 +1,3 @@
#include <utility>
#ifndef PORYGONLANG_PARSER_HPP
#define PORYGONLANG_PARSER_HPP

View File

@@ -1,6 +1,3 @@
#include <utility>
#ifndef PORYGONLANG_TOKEN_HPP
#define PORYGONLANG_TOKEN_HPP

View File

@@ -6,19 +6,19 @@
namespace Porygon::Parser {
class TypedVariableIdentifier {
HashedString _type;
HashedString _identifier;
const HashedString _type;
const HashedString _identifier;
public:
TypedVariableIdentifier(const HashedString& type, const HashedString& identifier)
: _type(type), _identifier(identifier) {
}
inline HashedString GetType() {
return _type;
inline const HashedString* GetType() {
return &_type;
}
inline HashedString GetIdentifier() {
return _identifier;
inline const HashedString* GetIdentifier() {
return &_identifier;
}
};
}