Skip to content

Commit

Permalink
fix: bug with compile function
Browse files Browse the repository at this point in the history
  • Loading branch information
ipranjal committed May 24, 2021
1 parent 3a7a909 commit db28908
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function pAttributeGroup(Node\AttributeGroup$node)

protected function pName(Name $node)
{
throw new \LogicException('Classes/Namespaces cannot be added in embedded logic');
return implode('\\', $node->parts);
}

protected function pName_FullyQualified(Name\FullyQualified$node)
Expand Down
4 changes: 2 additions & 2 deletions src/Php2js.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public static function compile($code){
}

$compiler= new Compiler;
$jsCode = $prettyPrinter->prettyPrint($ast);
return $newCode;
$jscode = $compiler->prettyPrint($ast);
return $jscode;
}

public static function compileFile($input,$output=null){
Expand Down

0 comments on commit db28908

Please sign in to comment.