Skip to content

Commit

Permalink
Merge pull request #298 from LeDron12/master
Browse files Browse the repository at this point in the history
 enum typedef + enum constants printf
  • Loading branch information
IngeniariusSoftware committed Aug 7, 2022
2 parents 5d3951d + be6f4b6 commit 491d81a
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 66 deletions.
84 changes: 42 additions & 42 deletions project/src/transpiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,55 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")

# Source files list
set(SOURCE_FILES
# Headers
vardecl.h
analyzers.h
matchers.h
util.h
memory_manager.h
unit_transpiler.h
eo_object.h
function_manager.h
transpile_helper.h
recorddecl.h
record_manager.h
aliases.h
tracer.h
process_variables.h
enumdecl.h
enum_manager.h
# Headers
vardecl.h
analyzers.h
matchers.h
util.h
memory_manager.h
unit_transpiler.h
eo_object.h
function_manager.h
transpile_helper.h
recorddecl.h
record_manager.h
aliases.h
tracer.h
process_variables.h
enumdecl.h
enum_manager.h

# Sources
main.cpp
vardecl.cpp
analyzers.cpp
matchers.cpp
util.cpp
memory_manager.cpp
unit_transpiler.cpp
eo_object.cpp
function_manager.cpp
transpile_helper.cpp
recorddecl.cpp
record_manager.cpp
tracer.cpp
process_variables.cpp
enumdecl.cpp
enum_manager.cpp)
# Sources
main.cpp
vardecl.cpp
analyzers.cpp
matchers.cpp
util.cpp
memory_manager.cpp
unit_transpiler.cpp
eo_object.cpp
function_manager.cpp
transpile_helper.cpp
recorddecl.cpp
record_manager.cpp
tracer.cpp
process_variables.cpp
enumdecl.cpp
enum_manager.cpp)

# add_executable(recvisitor main.cpp)
add_executable(c2eo ${SOURCE_FILES})

# llvm libraries
target_link_libraries(c2eo
clangAST
clangASTMatchers
clangBasic
clangFrontend
clangSerialization
clangTooling
LLVMSupport
LLVMFrontendOpenMP)
clangAST
clangASTMatchers
clangBasic
clangFrontend
clangSerialization
clangTooling
LLVMSupport
LLVMFrontendOpenMP)

set(LLVM_LINK_COMPONENTS
Support)
14 changes: 14 additions & 0 deletions project/src/transpiler/enum_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
EnumType EnumManager::Add(const clang::EnumDecl *id, std::string name,
size_t size,
const std::vector<EnumConstantType> &values) {
// llvm::outs() << "enum " << name << "\n";
// for (auto val : values) {
// llvm::outs() << "enum const " << val.name << " " << val.value <<
// "\n";
// }
EnumType enumType = {id, std::move(name), size, values};
enum_types.push_back(enumType);
return enumType;
Expand All @@ -44,3 +49,12 @@ EnumConstantType *EnumManager::GetConstantById(
}
return nullptr;
}

EnumType *EnumManager::GetById(const clang::EnumDecl *id) {
for (auto type = enum_types.begin(); type != enum_types.end(); type++) {
if (type->id == id) {
return type.base();
}
}
return nullptr;
}
2 changes: 2 additions & 0 deletions project/src/transpiler/enum_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class EnumManager {

EnumConstantType *GetConstantById(const clang::EnumConstantDecl *id);

EnumType *GetById(const clang::EnumDecl *id);

std::vector<EnumType> enum_types;
};

Expand Down
14 changes: 10 additions & 4 deletions project/src/transpiler/enumdecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@ EnumType ProcessEnumDecl(const clang::EnumDecl *ED) {
}

extern UnitTranspiler transpiler;
// if (transpiler.enum_manager_.GetById(ED)) {
// return {};
// }
if (transpiler.enum_manager_.GetById(ED) != nullptr) {
return {};
}

std::vector<EnumConstantType> constants;
std::string enum_name = "en-" + ED->getNameAsString();
std::string enum_name = "en-";
try {
enum_name += ED->getNameAsString();
} catch (std::exception &) {
enum_name += "noname";
}

uint64_t size = 0;

for (auto decl = ED->decls_begin(); decl != ED->decls_end(); decl++) {
Expand Down
14 changes: 14 additions & 0 deletions project/src/transpiler/transpile_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <utility>
#include <vector>

#include "src/transpiler/enumdecl.h"
#include "src/transpiler/memory_manager.h"
#include "src/transpiler/process_variables.h"
#include "src/transpiler/recorddecl.h"
Expand Down Expand Up @@ -139,6 +140,8 @@ EOObject GetSwitchEOObject(const SwitchStmt *p_stmt);
EOObject GetCaseCondEOObject(const vector<const Expr *> &all_cases,
const EOObject &switch_exp, size_t i);

void AppendDeclStmt(const DeclStmt *stmt);

extern UnitTranspiler transpiler;
extern ASTContext *context;

Expand Down Expand Up @@ -366,6 +369,8 @@ EOObject GetStmtEOObject(const Stmt *stmt) {
return GetFloatingLiteralEOObject(op);
}
if (stmt_class == Stmt::DeclStmtClass) {
const auto *op = dyn_cast<DeclStmt>(stmt);
AppendDeclStmt(op);
return EOObject(EOObjectType::EO_EMPTY);
}
if (stmt_class == Stmt::CallExprClass) {
Expand Down Expand Up @@ -602,6 +607,15 @@ EOObject GetSwitchEOObject(const SwitchStmt *p_stmt) {
return goto_object;
}

void AppendDeclStmt(const DeclStmt *stmt) {
for (auto *decl : stmt->decls()) {
if (decl->getKind() == Decl::Kind::Enum) {
auto *enum_decl = dyn_cast<clang::EnumDecl>(decl);
ProcessEnumDecl(enum_decl);
}
}
}

EOObject GetCaseCondEOObject(const vector<const Expr *> &all_cases,
const EOObject &switch_exp, size_t i) {
EOObject eq_object{"eq"};
Expand Down
32 changes: 12 additions & 20 deletions project/tests/main/enum/enum.c → project/tests/main/enum/enum01.c
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
#include "stdio.h"

enum numbers_1 {
ZERO,
ONE,
TWO
};
enum numbers_1 { ZERO, ONE, TWO };

enum numbers_2 {
FIVE = 5,
TEN = 10,
FIFTEEN = 15
};
enum numbers_2 { FIVE = 5, TEN = 10, FIFTEEN = 15 };

enum numbers_3 {
TWENTY_FIVE = 25,
TWENTY_SIX,
TWENTY_SEVEN,
TWENTY_FIVE_2 = TWENTY_FIVE,
TWENTY_SIX_2,
TWENTY_SEVEN_2,
TWENTY_FOUR = 24,
MINUS_FOUR = -4,
MINUS_THREE,
MINUS_TWO
TWENTY_FIVE = 25,
TWENTY_SIX,
TWENTY_SEVEN,
TWENTY_FIVE_2 = TWENTY_FIVE,
TWENTY_SIX_2,
TWENTY_SEVEN_2,
TWENTY_FOUR = 24,
MINUS_FOUR = -4,
MINUS_THREE,
MINUS_TWO
};

int main() {
Expand Down
24 changes: 24 additions & 0 deletions project/tests/main/enum/enum02.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdio.h>

enum fred { a, b, c };

int main() {
printf("%d\n", a);
printf("%d\n", b);
printf("%d\n", c);

enum fred d;

typedef enum { e, f, g } h;
printf("%d\n", e);
printf("%d\n", f);
printf("%d\n", g);

typedef enum { i, j, k } m;

printf("%d\n", i);
printf("%d\n", j);
printf("%d\n", k);

return 0;
}

2 comments on commit 491d81a

@0pdd
Copy link
Member

@0pdd 0pdd commented on 491d81a Aug 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ && pdd -v -f /tmp/20220807-29554-7ybyeo [1]: + set -e + set -o pipefail + cd /tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ + pdd -v -f...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ && pdd -v -f /tmp/20220807-29554-7ybyeo [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ
+ pdd -v -f /tmp/20220807-29554-7ybyeo

My version is 0.21.3
Ruby version is 2.7.5 at x86_64-linux
Reading from root dir /tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ
/tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/.gitmodules is a binary file (0 bytes)
/tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/project/scripts/data/skips/test.txt is a binary file (0 bytes)
/tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/project/tests/in_progress/for_main/.gitkeep is a binary file (0 bytes)
/tmp/0pdd20220807-14-1rt5p2o/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/result/eo/c2eo/src/.gitkeep is a binary file (0 bytes)
Reading .gitignore ...
Reading .gitattributes ...
Reading Dockerfile ...
Reading .rultor.yml ...
Reading project/CMakeLists.txt ...
Reading project/scripts/build_c2eo.py ...
Reading project/scripts/build_eo.py ...
Reading project/scripts/code_lines.py ...
Reading project/scripts/c2eo-all.py ...
Reading project/scripts/clang_tidy.py ...
Reading project/scripts/compile.py ...
Reading project/scripts/readme.md ...
Reading project/scripts/clean_before_transpilation.py ...
Reading project/scripts/tools.py ...
Reading project/scripts/update-release.py ...
Reading project/scripts/test.py ...
Reading project/scripts/transpile.py ...
Reading project/scripts/codecov.py ...
Reading project/scripts/data/settings.yml ...
Reading project/scripts/data/meta/run.sh.txt ...
Reading project/scripts/data/meta/plug.txt ...
Reading project/scripts/data/skips/gcc.txt ...
Reading project/scripts/data/skips/testcuite.txt ...
ERROR: project/scripts/data/skips/testcuite.txt; PDD::Error at project/scripts/data/skips/testcuite.txt:2: TODO found, but puzzle can't be parsed, most probably because TODO is not followed by a puzzle marker, as this page explains: https://github.com/cqfn/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/cqfn/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/cqfn/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:73:in `rescue in block in xml'
/app/objects/git_repo.rb:70:in `block in xml'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/tempfile.rb:291:in `open'
/app/objects/git_repo.rb:69:in `xml'
/app/objects/puzzles.rb:41:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:519:in `process_request'
/app/0pdd.rb:356:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1686:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1686:in `block in compile!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1023:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1042:in `route_eval'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1023:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1071:in `block in process_route'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1069:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1069:in `process_route'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1021:in `block in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1018:in `each'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1018:in `route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1140:in `block in dispatch!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `block in invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1135:in `dispatch!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:949:in `block in call!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `block in invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:949:in `call!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:938:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:255:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:248:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:218:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1993:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1553:in `block in call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1769:in `synchronize'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1553:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/webrick/server.rb:307:in `block in start_thread'

@0pdd
Copy link
Member

@0pdd 0pdd commented on 491d81a Aug 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ && pdd -v -f /tmp/20220809-11283-runx8 [1]: + set -e + set -o pipefail + cd /tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ + pdd -v -f...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ && pdd -v -f /tmp/20220809-11283-runx8 [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ
+ pdd -v -f /tmp/20220809-11283-runx8

My version is 0.21.3
Ruby version is 2.7.5 at x86_64-linux
Reading from root dir /tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ
/tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/.gitmodules is a binary file (0 bytes)
/tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/project/scripts/data/skips/test.txt is a binary file (0 bytes)
/tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/project/tests/in_progress/for_main/.gitkeep is a binary file (0 bytes)
/tmp/0pdd20220809-14-bzttm6/Z2l0QGdpdGh1Yi5jb206cG9seXN0YXQvYzJlby5naXQ/result/eo/c2eo/src/.gitkeep is a binary file (0 bytes)
Reading .gitignore ...
Reading .gitattributes ...
Reading Dockerfile ...
Reading .rultor.yml ...
Reading project/CMakeLists.txt ...
Reading project/scripts/build_c2eo.py ...
Reading project/scripts/build_eo.py ...
Reading project/scripts/code_lines.py ...
Reading project/scripts/c2eo-all.py ...
Reading project/scripts/clang_tidy.py ...
Reading project/scripts/compile.py ...
Reading project/scripts/readme.md ...
Reading project/scripts/clean_before_transpilation.py ...
Reading project/scripts/tools.py ...
Reading project/scripts/update-release.py ...
Reading project/scripts/test.py ...
Reading project/scripts/transpile.py ...
Reading project/scripts/codecov.py ...
Reading project/scripts/data/settings.yml ...
Reading project/scripts/data/meta/run.sh.txt ...
Reading project/scripts/data/meta/plug.txt ...
Reading project/scripts/data/skips/gcc.txt ...
Reading project/scripts/data/skips/testcuite.txt ...
ERROR: project/scripts/data/skips/testcuite.txt; PDD::Error at project/scripts/data/skips/testcuite.txt:2: TODO found, but puzzle can't be parsed, most probably because TODO is not followed by a puzzle marker, as this page explains: https://github.com/cqfn/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/cqfn/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/cqfn/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:73:in `rescue in block in xml'
/app/objects/git_repo.rb:70:in `block in xml'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/tempfile.rb:291:in `open'
/app/objects/git_repo.rb:69:in `xml'
/app/objects/puzzles.rb:41:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:519:in `process_request'
/app/0pdd.rb:356:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1686:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1686:in `block in compile!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1023:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1042:in `route_eval'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1023:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1071:in `block in process_route'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1069:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1069:in `process_route'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1021:in `block in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1018:in `each'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1018:in `route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1140:in `block in dispatch!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `block in invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1135:in `dispatch!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:949:in `block in call!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `block in invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1112:in `invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:949:in `call!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:938:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.2/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:255:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:248:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:218:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1993:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1553:in `block in call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1769:in `synchronize'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.2/lib/sinatra/base.rb:1553:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.7.5/lib/ruby/2.7.0/webrick/server.rb:307:in `block in start_thread'

Please sign in to comment.