Changes between Version 2 and Version 3 of SemanticQuery/MacroEntity


Ignore:
Timestamp:
Sep 17, 2012, 1:45:08 PM (12 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SemanticQuery/MacroEntity

    v2 v3  
     1{{{#!comment}}} 
    12= Macro entity = 
    23 
     
    1920* {{{arity}}} (''int''): returns the arity of a given parametric macro. In case of a constant macro the arity is 0. 
    2021* {{{const}}} (''bool''): returns true if the given macro is a constant. Note, that there are parametric macros with no parameters, they are treated as non-constant macros. 
     22* {{{body}}} (''string''): returns the body of the given macro. 
     23}}} 
     24 
     25= Macro entity = 
     26 
     27Preprocessor macro directives can be queried using the macro entity. 
     28 
     29== Initial selector ==  
     30* {{{@macro}}}: this selector can be used to start a query with the currently selected macro. 
     31 
     32== Selectors ==  
     33 
     34''In parentheses you find the type of the result elements.'' 
     35 
     36* {{{refs}}} (''expression''): returns every expression that refers to the given macro with the form {{{?Macro...}}}. 
     37* {{{file}}} (''file''): returns the file entity that the macro is defined in. 
     38 
     39== Properties ==  
     40 
     41Macro entities have the following properties: 
     42* {{{name}}} (''atom, string''): returns the identifier of the macro. 
     43* {{{arity}}} (''int''): returns the arity of a given parametric macro. In case of a constant macro the arity is 0. 
     44* {{{const}}} (''bool''): returns true if the given macro is a constant. Note, that there are parametric macros with no parameters, they are treated as non-constant macros.