Fix spelling
This commit is contained in:
parent
6d3e9df89f
commit
498e8124f6
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) ->
|
||||
|
|
Loading…
Reference in New Issue