fn_name ⁡ [simple arg or (simple arg)]
(mrow: Element)
| 244 | |
| 245 | // fn_name ⁡ [simple arg or (simple arg)] |
| 246 | fn is_function(mrow: Element) -> bool { |
| 247 | assert!( is_tag(mrow, "mrow") ); |
| 248 | let children = mrow.children(); |
| 249 | if children.len() != 3 { |
| 250 | return false; |
| 251 | } |
| 252 | if !(is_COE_tag(&children[1], "mo") && |
| 253 | is_equal(&children[1], '\u{2061}') ) { // invisible function application |
| 254 | return false; |
| 255 | } |
| 256 | if !is_COE_tag(&children[0], "mi") { |
| 257 | return false; |
| 258 | } |
| 259 | let function_arg = children[2].element().unwrap(); |
| 260 | if IsBracketed::is_bracketed(function_arg, "(", ")", false, false) { |
| 261 | return IsNode::is_simple(function_arg.children()[1].element().unwrap()); |
| 262 | } else { |
| 263 | return IsNode::is_simple(function_arg); |
| 264 | } |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | // Returns true if 'frac' is a common fraction |
nothing calls this directly
no test coverage detected