Sha256: 532b9fd43bb3745888291700a0c964f9b0d88c4ce2be0bba5e74bfa9f6840c6f

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

require "hemingway/math/math_nodes"

module Hemingway
  grammar Math

    # Example: $ \Pi = 3.14159 $
    rule math
      math_start symbol math_end <MathNode>
    end

    # Example : \Pi
    # Notes:
    #  - Once again, math_symbol need not have an html method defined on it.
    #  When .html is called on symbol, it knows the match is actually a
    #  math_symbol, so that is what symbol.html is actually calling.
    rule symbol
      math_symbol
    end

    rule math_start
      "$"
    end

    rule math_end
      "$"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hemingway-0.0.2 lib/hemingway/math/math.treetop