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
// include uglify library | |
var jsp = require("uglify-js").parser; | |
var pro = require("uglify-js").uglify; | |
// returns a sorted list of variable references | |
function parseVariables(code) { | |
var ast = jsp.parse(code, false, false); | |
var w = pro.ast_walker(); | |
var vars = []; |
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
module Main where | |
import Control.Applicative ((<$>)) | |
import Data.List (nub, sort) | |
import Data.Maybe (catMaybes, maybeToList) | |
import Language.JavaScript.Parser | |
import Safe | |
import System (getArgs) | |
main = do |
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
<html> | |
<head> | |
<title> JavaScript Variable Name Parser</title> | |
<style type="text/css"> | |
.inputtext { width: 512px; height: 512px; } | |
</style> | |
<script language="JavaScript"> | |
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" > | |
<head> | |
<title>AST Builder</title> | |
<script type="text/javascript"> | |
function cEl(tn){return document.createElement(tn)} | |
function byId(id){return document.getElementById(id)} | |
function cTN(s){return document.createTextNode(s)} |
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 jsp = require("uglify-js").parser; | |
var pro = require("uglify-js").uglify; | |
var file = process.argv.splice(2).toString(); | |
var fs = require( 'fs'); | |
var output; | |
fs.readFile(file, | |
function(err, data){ | |
if(err){ |
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
/* A little error checking for input file */ | |
if (process.argv.length < 3) { | |
throw new Error('Usage: node vars.js <example.js>'); | |
} | |
/* variables and whatnot */ | |
var parse = require('./parse-js.js'); | |
var fs = require('fs'); | |
var varList = []; | |
var getVars = function getVars(elm) { |
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
<html> | |
<head> | |
<script src='jslint.js'></script> | |
<script> | |
function findVariables() { | |
var text = document.getElementById('inputJS').value; | |
var output = ""; | |
var res = JSLINT(text, {'bitwise': true, 'browser': true, | |
'cap': true, 'continue': true, | |
'debug': true, 'devel': true, |
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 | |
namespace Symfony\Component\Form\Tests\Extension\Core\Type; | |
use Symfony\Component\Form\FormError; | |
class DateTimeTypeTest extends LocalizedTestCase | |
{ | |
public function testSubmit_dateTime() |
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
package edu.calpoly.cpe102sp12; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import org.bukkit.Material; | |
public class Testing | |
{ | |
RectangularPrism cube1 = new RectangularPrism(5,5,5,5,5,5); |
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
package edu.calpoly.cpe102sp12; | |
import static org.junit.Assert.*; | |
import org.bukkit.Material; | |
import org.junit.Test; | |
public class Testing | |
{ | |
@Test |