Skip to content

Commit 318d05b

Browse files
committed
Rename constCI to classConst
1 parent cc14e81 commit 318d05b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/main/rascal/lang/php/analysis/evaluators/DefinedConstants.rsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public set[ConstItem] getScriptConstUses(Script scr) {
107107
}
108108
109109
public set[ConstItemExp] getScriptConstDefs(Script scr) =
110-
{ classConst(cln, cn, ce) | /class(cln,_,_,_,cis,_) := scr, constCI(consts,_,_) <- cis, const(cn,ce) <- consts } + // TODO: Do we need to worry about const modifiers?
110+
{ classConst(cln, cn, ce) | /class(cln,_,_,_,cis,_) := scr, classConst(consts,_,_) <- cis, const(cn,ce) <- consts } + // TODO: Do we need to worry about const modifiers?
111111
{ normalConst(cn, ce) | /call(name(name("define")),[actualParameter(scalar(string(cn)),false,false,_),actualParameter(ce,false,false,_)]) := scr } +
112112
{ normalConst(cn, ce) | /Stmt::const(cl) := scr, Const::const(cn,ce) <- cl };
113113

src/main/rascal/lang/php/analysis/signatures/Signatures.rsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Signature getFileSignature(loc fileloc, Script scr, bool buildInfo=false)
5656
}
5757
}
5858
}
59-
for(constCI(consts,_,_) <- cis, const(cn,ce) <- consts) {
59+
for(classConst(consts,_,_) <- cis, const(cn,ce) <- consts) {
6060
items += classConstSig(classConstPath(cln, cn), ce);
6161
}
6262
}
@@ -92,7 +92,7 @@ public Signature getFileSignature(loc fileloc, Script scr, bool buildInfo=false)
9292
9393
public Signature getScriptConstants(loc fileloc, Script scr) {
9494
set[SignatureItem] items =
95-
{ classConstSig(classConstPath(cln, cn), ce) | /class(cln,_,_,_,cis,_) := scr, constCI(consts,_,_) <- cis, const(cn,ce) <- consts } +
95+
{ classConstSig(classConstPath(cln, cn), ce) | /class(cln,_,_,_,cis,_) := scr, classConst(consts,_,_) <- cis, const(cn,ce) <- consts } +
9696
{ constSig(constPath(cn),e) | /call(name(name("define")),[actualParameter(scalar(string(cn)),false,false,_),actualParameter(e,false,false,_)]) := scr };
9797
return fileSignature(fileloc, items);
9898
}

src/main/rascal/lang/php/ast/AbstractSyntax.rsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public data Use(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", loc sco
239239

240240
public data ClassItem(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", loc scope=|unknown:///|, str phpdoc="")
241241
= property(set[Modifier] modifiers, list[Property] prop, PHPType propType, list[AttributeGroup] attributeGroups)
242-
| constCI(list[Const] consts, set[Modifier] modifiers, list[AttributeGroup] attributeGroups)
242+
| classConst(list[Const] consts, set[Modifier] modifiers, list[AttributeGroup] attributeGroups)
243243
| method(str name, set[Modifier] modifiers, bool byRef, list[Param] params, list[Stmt] body, PHPType returnType, list[AttributeGroup] attributeGroups)
244244
| traitUse(list[Name] traits, list[Adaptation] adaptations)
245245
| enumCase(str caseName, OptionExpr caseExpr, list[AttributeGroup] attributeGroups)

src/main/rascal/lang/php/pp/PrettyPrinter.rsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ public str pp(ClassItem::property(set[Modifier] modifiers, list[Property] prop,
568568
"<for(p <- prop) {><intercalate(" ",[pp(m)|m<-modifiers])> <pp(ptype)> <pp(p)>;
569569
'<}>";
570570
571-
// | constCI(list[Const] consts)
572-
public str pp(constCI(list[Const] consts, set[Modifier] modifiers, _)) = "const <intercalate(",",[pp(c)|c<-consts])>;";
571+
// | classConst(list[Const] consts)
572+
public str pp(classConst(list[Const] consts, set[Modifier] modifiers, _)) = "const <intercalate(",",[pp(c)|c<-consts])>;";
573573
574574
// | method(str name, set[Modifier] modifiers, bool byRef, list[Param] params, list[Stmt] body)
575575
// TODO classes of interfaces have no body

src/main/rascal/lang/php/stats/Stats.rsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public list[str] stmtKeyOrder() = [ "break", "class def", "const", "continue", "
385385
"try/catch", "unset", "use", "while" ];
386386
387387
public str getClassItemKey(ClassItem::property(set[Modifier] modifiers, list[Property] prop, PHPType ptype, _)) = "propertyDef";
388-
public str getClassItemKey(ClassItem::constCI(list[Const] consts, set[Modifier] modifiers, _)) = "classConstDef";
388+
public str getClassItemKey(ClassItem::classConst(list[Const] consts, set[Modifier] modifiers, _)) = "classConstDef";
389389
public str getClassItemKey(ClassItem::method(str name, set[Modifier] modifiers, bool byRef, list[Param] params, list[Stmt] body, PHPType returnType, _)) = "methodDef";
390390
public str getClassItemKey(ClassItem::traitUse(list[Name] traits, list[Adaptation] adaptations)) = "traitUse";
391391

0 commit comments

Comments
 (0)