0

So I currently have the current directory structure:

- project
  - lib
    - struct
      - external
        - external.cr
  - src
    - project
      - version.cr
    - project.cr
  - ...
  - shard.yml

I am currently compiling my code using the current command, whilst in the main project directory (containing shard.yml):

`crystal src/project.cr`

I then receive the following error:

Error in src/project.cr:2: while requiring "struct/external"

require "struct/external"
^

Syntax error in lib/struct/external/external.cr:15: expecting identifier 'end', not 'EOF'

My project.cr file looks like this:

require "./project/*"
require "struct/external"

# Doc omitted 
module Project
    extend self
end

My external.cr file looks like this:

#
class External
    def initialize(@vertices : Array(SubclassOne), @edges : Array(SubclassTwo))
end

#
class SubclassOne
    def initialize()
end

#
class SubclassTwo
    def initialize()
end
madcrazydrumma
  • 1,847
  • 3
  • 20
  • 38

1 Answers1

0

The functions within the classes in the external file were missing the end keyword.

madcrazydrumma
  • 1,847
  • 3
  • 20
  • 38