Sha256: a823995517e2c584d79c887c9400235c587c3943399ad0e8bcffdfd30bc498fc

Contents?: true

Size: 1.51 KB

Versions: 28

Compression:

Stored size: 1.51 KB

Contents

grammar EbnfExpression
  include EbnfArguments
  rule ebnf
    klass_method / instance_method / klass_property / instance_property / utility / constructor / mixin / klass / constant / namespace 
  end
  
  rule mixin
    space* 'mixin' space+ js_namespace  (includes)? <Mixin>
  end
  
  rule klass
    space* 'class' space+ js_namespace extends:(space+ '<' space+ js_namespace)? (includes)? <Klass>
  end
  
  rule includes
    line space* 'includes' space+ js_namespace more:(',' space+ js_namespace)*
  end
  
  rule constructor
    space* 'new' (space)+ js_namespace args <Constructor>
  end
  
  rule instance_accessor
    js_namespace '#' js_variable
  end
  
  rule instance_signature
    instance_accessor args
  end

  rule klass_method
    space* js_namespace args return_value <KlassMethod>
  end
  
  rule instance_method
    space* instance_signature return_value <InstanceMethod>
  end
  
  rule klass_property
    space* js_namespace return_value <KlassProperty>
  end
  
  rule instance_property
    space* instance_accessor return_value <InstanceProperty>
  end

  rule constant
    space* js_namespace space* "=" space* value:(char)+ space* <Constant>
  end
  
  rule utility
    space* utility_name:('$' [$a-zA-Z]*) args return_value <Utility>
  end
  
  rule args
    '(' space* methodize:'@'? arguments space* ')' {
      def text_value
        super.to_s.sub('( )', '()')
      end
    }
  end

  rule namespace
    js_namespace (includes)? <Namespace>
  end

  rule return_value
    space* '->' space* value:(char)+
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
distil-0.14.4 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.3 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.2 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.2.a vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.1 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.1.a vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.0 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.0.i vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.0.h vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.0.g vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.0.d vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.0.c vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.14.0.b vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.13.6 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.13.5 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.13.4 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.13.3 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.13.2 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.13.1 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop
distil-0.13.0 vendor/pdoc/lib/pdoc/parser/treetop_files/ebnf_expression.treetop