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
| ; The entire ECMAScript grammar expressed as a single PEG | |
| ; Parser rules which share a name with ECMA-262 productions are intended to match the same language. | |
| Program ← | |
| (S? (Statement / FunctionDeclaration))* S? | |
| FunctionBody ← | |
| (S? (Statement / FunctionDeclaration))* 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 peg = require('./peg') ; | |
| var sys = require('sys') ; | |
| var posix = require('posix') ; | |
| posix.cat("./ECMAScript_jsdoc.peg").addCallback(function (grammar) { | |
| var parser = peg.generateParser(grammar) ; | |
| sys.puts(parser) ; | |
| }); |
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
| MyApp.menuPane.statechart: SC.Statechart.create({ | |
| }); | |
| MyApp.myPage = SC.Page.design({ | |
| menuPane: SC.Pane.design({ |
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
| // give CoreOI.Server time to load... | |
| SC.ready(function() { | |
| CoreOI.store = SC.Store.create().from(CoreOI.Server.create()) ; | |
| }); |
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 query1 = SC.Query.create( /** omitted */ ); | |
| var query2 = SC.Query.create( /** omitted */ ); | |
| var joinQuery = SC.Query.create( | |
| // omitted | |
| ).from(query1, query2); |
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
| valueBinding: SC.Binding.transform(function(value, binding) { | |
| return "how many: %@" .fmt(value); | |
| }).from('MyApp.arrayController.length') |
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
| fooBinding: 'MyApp.controller.name', | |
| barBinding: 'MyApp.aryController.length', | |
| value: function() { | |
| return "The array named %@ has length %@".fmt(this.get('foo'), this.get('bar')); | |
| }.property('foo', 'bar').cacheable() |
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
| // | |
| // MainWindow.objc | |
| // PhotoBooth | |
| // | |
| // Copyright 2008 Erich Atlas Ocean. All rights reserved. | |
| // | |
| sc_require( "PhotoBooth" ); | |
| @synchronized( PB ) { |
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
| contentView: OI.MailboxSourceView.design({ | |
| layerId: 'mailbox-list', | |
| classNames: 'mailbox-list'.w(), | |
| // delegate: 'OI*mailboxesController', | |
| contentValueKey: 'name', | |
| contentUnreadCountKey: 'unreadCount', | |
| contentBinding: 'OI*mailboxesController.arrangedObjects', | |
| selectionBinding: 'OI*mailboxesController.selection', | |
| selectOnMouseDown: YES, | |
| acceptsFirstResponder: YES, |
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
| valueBinding: SC.Binding.transform(function(value, binding) { | |
| if (value === SC.Record.READY_DIRTY || | |
| value === SC.Record.READY_NEW) { | |
| return YES; | |
| } else return NO; | |
| }).from('Todos.taskController.status') |