Skip to content

Commit

Permalink
comments schema for erlang
Browse files Browse the repository at this point in the history
Summary:
add comments predicate to erlang schema
according to the [docs](https://www.internalfb.com/intern/staticdocs/glean/docs/schema/changing/) it should be backward compatible
www sync: D55924286

Reviewed By: phlalx

Differential Revision: D55917964

fbshipit-source-id: 753a00ceb8fba34bbd34cb4d363c5ef002823e45
  • Loading branch information
perehonchuk authored and facebook-github-bot committed Apr 10, 2024
1 parent 2cfde52 commit fe43ce2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions glean/schema/source/codemarkup.angle
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,9 @@ predicate EntityComments:
{ java = Decl } = Entity;
codemarkup.java.JavaEntityDocumentation { Decl, File, Span };
nothing = Text
) | (
{ erlang = Decl } = Entity;
codemarkup.erlang.ErlangEntityDocumentation { Decl, File, Span, Text}
) | (
{ fbthrift = Decl } = Entity;
codemarkup.fbthrift.FbthriftEntityDocumentation { Decl, File, Span };
Expand Down
11 changes: 11 additions & 0 deletions glean/schema/source/codemarkup.erlang.angle
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,15 @@ predicate ErlangEntityInfo:
{ E, { kind = K, isAbstract = false } } where
ErlangEntityKind { E, K }

predicate ErlangEntityDocumentation :
{
entity : code.erlang.Entity,
file : src.File,
span : src.ByteSpan,
text : maybe string,
}
{ Entity, File, Span, Text } where
{ decl = Decl } = Entity;
erlang.DeclarationComment { Decl1, File, Span, Text };
erlang.Declaration { func = Decl1 } = Decl
}
8 changes: 8 additions & 0 deletions glean/schema/source/erlang.angle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ predicate FunctionDeclaration :
span : src.ByteSpan,
}

predicate DeclarationComment:
{
declaration : FunctionDeclaration,
file : src.File,
span : src.ByteSpan,
text : maybe string,
}

## types

type Declaration =
Expand Down

0 comments on commit fe43ce2

Please sign in to comment.