Skip to main content

module lang::php::analysis::signatures::Signatures

rascal-0.40.17
php-analysis-0.2.4

Usage

import lang::php::analysis::signatures::Signatures;

Source code

http://github.com/cwi-swat/php-analysis/blob/main/src/main/rascal/lang/php/analysis/signatures/Signatures.rsc

Dependencies

import lang::php::analysis::NamePaths;
import lang::php::ast::AbstractSyntax;
import lang::php::ast::System;
import List;

data ParamInfo

data ParamInfo  
= paramInfo(str paramName, bool isRef)
| paramInfo(str paramName, str givenType, bool isRef)
;

data SignatureItem

data SignatureItem (loc at=|unknown:///|) 
= functionSig(loc namepath, int parameterCount)
| functionSig(loc namepath, list[ParamInfo] parameterInfo)
| constSig(loc namepath, Expr e)
| classSig(loc namepath)
| methodSig(loc namepath, int parameterCount)
| methodSig(loc namepath, list[ParamInfo] parameterInfo)
| classConstSig(loc namepath, Expr e)
;

data Signature

data Signature  
= fileSignature(loc fileloc, set[SignatureItem] items)
;

function getFileSignature

Signature getFileSignature(loc fileloc, Script scr, bool buildInfo=false)

function getScriptConstants

Signature getScriptConstants(loc fileloc, Script scr)

function getSystemSignatures

map[loc,Signature] getSystemSignatures(System sys)

function getConstantSignatures

map[loc,Signature] getConstantSignatures(System sys)

function getAllDefinedConstants

rel[SignatureItem, loc] getAllDefinedConstants(System scripts)

function getDefinitionsForItem

rel[SignatureItem,loc] getDefinitionsForItem(System scripts, loc itemName)