Skip to content

Commit

Permalink
Start working on method implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
epeld committed Apr 10, 2017
1 parent 526f605 commit 183fd95
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions java.pl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
java_type(Type) --> composite_java_type(Type, _).


mutable(mutable) -->.
final(final) --> "final".

argument([argument, Name, Type, Mutability]) -->
Expand All @@ -146,6 +147,23 @@
( {Args = []} ; ",", argument_list(Args) ).


method([method, Name, Type, Mutability, Visibility, Arguments, Body]) -->
( visibility(Visibility),
blank, extrablanks ;
{ Visibility = package } ),
java_type(Type),
( final(Mutability),
blank, extrablanks ;
mutable(Mutability) ),
name(Name),
blank, extrablanks
argument_list(Arguments),
blank, extrablanks,
block(Body).




block([block, Text]) -->
"{", block_body(Text), "}".

Expand Down

0 comments on commit 183fd95

Please sign in to comment.