Module: Plurimath::UnicodeMath::ParsingRules::SubSup
- Includes:
- Helper
- Included in:
- Plurimath::UnicodeMath::Parse
- Defined in:
- lib/plurimath/unicode_math/parsing_rules/sub_sup.rb
Instance Method Summary collapse
- #baseless_sub_values(soperand_name) ⇒ Object
- #baseless_sup_values(soperand_name) ⇒ Object
- #paren_wrap_rule(passed_rule) ⇒ Object
Methods included from Helper
Instance Method Details
#baseless_sub_values(soperand_name) ⇒ Object
244 245 246 247 |
# File 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb', line 244 def baseless_sub_values(soperand_name) (mini_sub_sup | sub_sup_paren).as(soperand_name) >> recursive_baseless_sub_exp.maybe >> sub_sup_values.maybe | sub_sup_values.as(soperand_name) >> recursive_baseless_sub_exp.maybe end |
#baseless_sup_values(soperand_name) ⇒ Object
249 250 251 252 |
# File 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb', line 249 def baseless_sup_values(soperand_name) (mini_sub_sup | sub_sup_paren).as(soperand_name) >> recursive_baseless_sup_exp.maybe >> sub_sup_values.maybe | sub_sup_values.as(soperand_name) >> recursive_baseless_sup_exp.maybe end |
#paren_wrap_rule(passed_rule) ⇒ Object
239 240 241 242 |
# File 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb', line 239 def paren_wrap_rule(passed_rule) (op_opener >> space? >> passed_rule >> space? >> op_closer) | passed_rule end |