Skip to content
pschipitschPublic
forked from sikula/ruby-hcl

About

Ruby Parser for the Hashicorp Configuration Language

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby-hcl

Ruby Parser for the Hashicorp Configuration Language

Lexer

Parser


Hashicorp Configuration Language

Examples

  some_value "other_value" {
    key = "value"
  }

will create a hash which looks like:

{"some_value" => {"other_value" => {"key" => "value"}}}

Ruby-HCL Usage

require 'hcl'
require 'json'

contents = HCLParser.new.parse(File.read("file_to_parse.hcl"))
puts JSON.dump(contents)

TODO

  • Properly handle nested multi-line comments
  • Properly handle floating point values
  • Create a HCL class as an to load/dump/parse HCL files
  • Write tests for the lexer
  • Write tests for the parser

About

Ruby Parser for the Hashicorp Configuration Language

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages