This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Syntax::Abstract::Glagol; | |
import Prelude; | |
import Parser::ParseAST; | |
import Config::Reader; | |
import Compiler::PHP::Compiler; | |
import Transform::Glagol2PHP::Namespaces; | |
println(toCode(toList(range(toPHPScript(<zend(), doctrine()>, parseModule(|cwd:///../Example.g|).\module)))[0])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public list[int] sort2(list[int] numbers){ | |
switch(numbers){ | |
case [*int nums1, int p, int q, *int nums2]: | |
if(p > q){ | |
return sort2(nums1 + [q, p] + nums2); | |
} else { | |
fail; | |
} | |
default: return numbers; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// BEFORE: | |
public function deletionAction() | |
{ | |
$project = $this->getProject($this->params()->fromRoute('projectId')); | |
if ($this->request->isPost() && $project) { | |
/** @var \Projects\Model\ProjectDeleter $deleter */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$VAR$ = typeof $VAR$ !== 'undefined' ? $VAR$ : $DEFAULT$; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
'use strict'; | |
$END$ | |
})(window.jQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, scope) { | |
'use strict'; | |
/** | |
* Class for $PURPOSE$ | |
* | |
* @constructor | |
*/ | |
var $CLASS_NAME$ = function ($PARAMS$) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Setter for $${PARAM_NAME} | |
* | |
* @param ${TYPE_HINT} $${PARAM_NAME} | |
* @return ${CLASS_NAME} Provides fluent interface | |
*/ | |
public ${STATIC} function set${NAME}($${PARAM_NAME}) | |
{ | |
#if (${STATIC} == "static") | |
self::$${FIELD_NAME} = $${PARAM_NAME}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Getter for $${FIELD_NAME} | |
* | |
* @return ${TYPE_HINT} | |
*/ | |
public ${STATIC} function ${GET_OR_IS}${NAME}() | |
{ | |
#if (${STATIC} == "static") | |
return self::$${FIELD_NAME}; | |
#else |