lib/opal/nodes/x_string.rb
# Will drop the trailing semicolon if all conditions are met
Will drop the trailing semicolon if all conditions are met
Will drop the trailing semicolon if all conditions are met
def extract_last_value(last_child)
        last_value = last_child.loc.expression.source.rstrip
        if (@returning || expr?) && last_value.end_with?(';')
          compiler.warning(
            'Removed semicolon ending x-string expression, interpreted as unintentional',
            last_child.line,
          )
          last_value = last_value[0..-2]
        end
        @should_add_semicolon = true if @returning
        last_value
      end
def extract_last_value ( last_child ) last_value = last_child . loc . expression . source . rstrip if ( @returning || expr? ) && last_value . end_with? ( ';' ) compiler . warning ( 'Removed semicolon ending x-string expression, interpreted as unintentional' , last_child . line , ) last_value = last_value [ 0 .. - 2 ] end @should_add_semicolon = true if @returning last_value end
Will drop the trailing semicolon if all conditions are met
Will drop the trailing semicolon if all conditions are met
last_child
<not_specific>