loxxy 0.0.4 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -0
- data/.yardopts +6 -0
- data/CHANGELOG.md +54 -0
- data/README.md +43 -15
- data/lib/loxxy.rb +1 -0
- data/lib/loxxy/ast/ast_builder.rb +157 -0
- data/lib/loxxy/ast/ast_visitor.rb +125 -0
- data/lib/loxxy/ast/lox_binary_expr.rb +22 -0
- data/lib/loxxy/ast/lox_compound_expr.rb +25 -0
- data/lib/loxxy/ast/lox_literal_expr.rb +25 -0
- data/lib/loxxy/ast/lox_node.rb +22 -0
- data/lib/loxxy/datatype/builtin_datatype.rb +3 -4
- data/lib/loxxy/datatype/false.rb +3 -3
- data/lib/loxxy/datatype/lx_string.rb +4 -9
- data/lib/loxxy/datatype/nil.rb +3 -3
- data/lib/loxxy/datatype/number.rb +2 -10
- data/lib/loxxy/datatype/true.rb +4 -4
- data/lib/loxxy/front_end/grammar.rb +45 -35
- data/lib/loxxy/front_end/literal.rb +1 -1
- data/lib/loxxy/front_end/parser.rb +56 -0
- data/lib/loxxy/front_end/raw_parser.rb +2 -3
- data/lib/loxxy/front_end/scanner.rb +4 -6
- data/lib/loxxy/version.rb +1 -1
- data/loxxy.gemspec +2 -2
- data/spec/datatype/lx_string_spec.rb +35 -35
- data/spec/front_end/parser_spec.rb +275 -0
- data/spec/front_end/raw_parser_spec.rb +6 -7
- data/spec/front_end/scanner_spec.rb +14 -2
- data/spec/loxxy_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -3
- metadata +12 -2
    
        data/spec/loxxy_spec.rb
    CHANGED
    
    
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -1,9 +1,11 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
             | 
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'rspec' # Use the RSpec framework
         | 
| 4 | 
            +
            require 'loxxy'
         | 
| 3 5 |  | 
| 4 6 | 
             
            RSpec.configure do |config|
         | 
| 5 7 | 
             
              # Enable flags like --only-failures and --next-failure
         | 
| 6 | 
            -
              config.example_status_persistence_file_path =  | 
| 8 | 
            +
              config.example_status_persistence_file_path = '.rspec_status'
         | 
| 7 9 |  | 
| 8 10 | 
             
              config.expect_with :rspec do |c|
         | 
| 9 11 | 
             
                # Disable the `should` syntax
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: loxxy
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.9
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Dimitri Geshef
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021-01- | 
| 11 | 
            +
            date: 2021-01-07 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rley
         | 
| @@ -77,12 +77,19 @@ files: | |
| 77 77 | 
             
            - ".rspec"
         | 
| 78 78 | 
             
            - ".rubocop.yml"
         | 
| 79 79 | 
             
            - ".travis.yml"
         | 
| 80 | 
            +
            - ".yardopts"
         | 
| 80 81 | 
             
            - CHANGELOG.md
         | 
| 81 82 | 
             
            - Gemfile
         | 
| 82 83 | 
             
            - LICENSE.txt
         | 
| 83 84 | 
             
            - README.md
         | 
| 84 85 | 
             
            - Rakefile
         | 
| 85 86 | 
             
            - lib/loxxy.rb
         | 
| 87 | 
            +
            - lib/loxxy/ast/ast_builder.rb
         | 
| 88 | 
            +
            - lib/loxxy/ast/ast_visitor.rb
         | 
| 89 | 
            +
            - lib/loxxy/ast/lox_binary_expr.rb
         | 
| 90 | 
            +
            - lib/loxxy/ast/lox_compound_expr.rb
         | 
| 91 | 
            +
            - lib/loxxy/ast/lox_literal_expr.rb
         | 
| 92 | 
            +
            - lib/loxxy/ast/lox_node.rb
         | 
| 86 93 | 
             
            - lib/loxxy/datatype/all_datatypes.rb
         | 
| 87 94 | 
             
            - lib/loxxy/datatype/boolean.rb
         | 
| 88 95 | 
             
            - lib/loxxy/datatype/builtin_datatype.rb
         | 
| @@ -93,11 +100,13 @@ files: | |
| 93 100 | 
             
            - lib/loxxy/datatype/true.rb
         | 
| 94 101 | 
             
            - lib/loxxy/front_end/grammar.rb
         | 
| 95 102 | 
             
            - lib/loxxy/front_end/literal.rb
         | 
| 103 | 
            +
            - lib/loxxy/front_end/parser.rb
         | 
| 96 104 | 
             
            - lib/loxxy/front_end/raw_parser.rb
         | 
| 97 105 | 
             
            - lib/loxxy/front_end/scanner.rb
         | 
| 98 106 | 
             
            - lib/loxxy/version.rb
         | 
| 99 107 | 
             
            - loxxy.gemspec
         | 
| 100 108 | 
             
            - spec/datatype/lx_string_spec.rb
         | 
| 109 | 
            +
            - spec/front_end/parser_spec.rb
         | 
| 101 110 | 
             
            - spec/front_end/raw_parser_spec.rb
         | 
| 102 111 | 
             
            - spec/front_end/scanner_spec.rb
         | 
| 103 112 | 
             
            - spec/loxxy_spec.rb
         | 
| @@ -128,6 +137,7 @@ specification_version: 4 | |
| 128 137 | 
             
            summary: An implementation of the Lox programming language. WIP
         | 
| 129 138 | 
             
            test_files:
         | 
| 130 139 | 
             
            - spec/datatype/lx_string_spec.rb
         | 
| 140 | 
            +
            - spec/front_end/parser_spec.rb
         | 
| 131 141 | 
             
            - spec/front_end/raw_parser_spec.rb
         | 
| 132 142 | 
             
            - spec/front_end/scanner_spec.rb
         | 
| 133 143 | 
             
            - spec/loxxy_spec.rb
         |