squiidz / yarderize

Ruby native shunting yard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yarderize

Ruby native shunting yard

Add a method eval to ruby string. If the evaluation is invalid it return 0.

require 'yarderize'

v = 8
"5 + 4 - 1 + #{v}".eval

About

Ruby native shunting yard


Languages

Language:Ruby 92.0%Language:Rust 6.4%Language:Shell 1.6%