Fix spelling

This commit is contained in:
Jason Davies 2010-11-13 10:37:55 +00:00
parent 6d3e9df89f
commit 498e8124f6
7 changed files with 13 additions and 12 deletions

View File

@ -317,7 +317,7 @@ _.zip = ->
# If the browser doesn't supply us with **indexOf** (I'm looking at you, MSIE),
# we need this function. Return the position of the first occurence of an
# we need this function. Return the position of the first occurrence of an
# item in an array, or -1 if the item is not included in the array.
_.indexOf = (array, item) ->
return array.indexOf item if nativeIndexOf and array.indexOf is nativeIndexOf

View File

@ -1,7 +1,7 @@
# CoffeeScript can be used both on the server, as a command-line compiler based
# on Node.js/V8, or to run CoffeeScripts directly in the browser. This module
# contains the main entry functions for tokenzing, parsing, and compiling source
# CoffeeScript into JavaScript.
# contains the main entry functions for tokenizing, parsing, and compiling
# source CoffeeScript into JavaScript.
#
# If included on a webpage, it will automatically sniff out, compile, and
# execute all scripts present in `text/coffeescript` tags.

View File

@ -62,7 +62,7 @@ grammar =
o 'Block TERMINATOR'
]
# Any list of statements and expressions, seperated by line breaks or semicolons.
# Any list of statements and expressions, separated by line breaks or semicolons.
Body: [
o 'Line', -> Expressions.wrap [$1]
o 'Body TERMINATOR Line', -> $1.push $3

View File

@ -15,7 +15,7 @@ exports.ends = (string, literal, back) ->
exports.compact = (array) ->
item for item in array when item
# Count the number of occurences of a character in a string.
# Count the number of occurrences of a character in a string.
exports.count = (string, letter) ->
num = pos = 0
num++ while pos = 1 + string.indexOf letter, pos

View File

@ -15,7 +15,7 @@
# The Lexer Class
# ---------------
# The Lexer class reads a stream of CoffeeScript and divvys it up into tagged
# The Lexer class reads a stream of CoffeeScript and divvies it up into tagged
# tokens. Some potential ambiguity in the grammar has been avoided by
# pushing some extra smarts into the Lexer.
exports.Lexer = class Lexer
@ -304,7 +304,7 @@ exports.Lexer = class Lexer
@tokens.pop() if @value() is '\\'
this
# We treat all other single characters as a token. Eg.: `( ) , . !`
# We treat all other single characters as a token. E.g.: `( ) , . !`
# Multi-character operators are also literal tokens, so that Jison can assign
# the proper order of operations. There are some symbols that we tag specially
# here. `;` and newlines are both treated as a `TERMINATOR`, we distinguish
@ -628,7 +628,7 @@ SHIFT = ['<<', '>>', '>>>']
# Comparison tokens.
COMPARE = ['==', '!=', '<', '>', '<=', '>=']
# Mathmatical tokens.
# Mathematical tokens.
MATH = ['*', '/', '%']
# Relational tokens that are negatable with `not` prefix.

View File

@ -77,7 +77,7 @@ exports.Base = class Base
# Construct a node that returns the current node's result.
# Note that this is overridden for smarter behavior for
# many statement nodes (eg If, For)...
# many statement nodes (e.g. If, For)...
makeReturn: ->
new Return this
@ -371,7 +371,7 @@ exports.Value = class Value extends Base
[base.push(name), new Value(bref or base.base, [nref or name])]
# We compile a value to JavaScript by compiling and joining each property.
# Things get much more insteresting if the chain of properties has *soak*
# Things get much more interesting if the chain of properties has *soak*
# operators `?.` interspersed. Then we have to take care not to accidentally
# evaluate anything twice when building the soak chain.
compileNode: (o) ->
@ -433,7 +433,8 @@ exports.Call = class Call extends Base
@isNew = true
this
# Grab the reference to the superclass' implementation of the current method.
# Grab the reference to the superclass's implementation of the current
# method.
superReference: (o) ->
{method} = o.scope
throw SyntaxError 'cannot call super outside of a function.' unless method

View File

@ -18,7 +18,7 @@ exports.OptionParser = class OptionParser
# Parse the list of arguments, populating an `options` object with all of the
# specified options, and returning it. `options.arguments` will be an array
# containing the remaning non-option arguments. This is a simpler API than
# containing the remaining non-option arguments. This is a simpler API than
# many option parsers that allow you to attach callback actions for every
# flag. Instead, you're responsible for interpreting the options object.
parse: (args) ->