From 5d2c2b2ab32bc59f94be9fdeddff8429ad534d40 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 5 Apr 2016 11:50:20 -0700 Subject: [PATCH] Fix line endings for files added in #804 PR #804 merged in some rather old files that have the old style line endings. This causes them to always show as edited on my machine. This change just updates the line ended to be consistent with the rest of our repo. --- .../Analysis/Analysis/GlobalBuilder.cs | 172 +++++++++--------- .../Analysis/Analysis/OverloadResult.cs | 4 +- .../Analysis/Values/BuiltinFunctionValue.cs | 8 +- 3 files changed, 92 insertions(+), 92 deletions(-) diff --git a/Nodejs/Product/Analysis/Analysis/GlobalBuilder.cs b/Nodejs/Product/Analysis/Analysis/GlobalBuilder.cs index 635e1b48d..b97f1c3a8 100644 --- a/Nodejs/Product/Analysis/Analysis/GlobalBuilder.cs +++ b/Nodejs/Product/Analysis/Analysis/GlobalBuilder.cs @@ -1681,94 +1681,94 @@ private static IAnalysisSet StringToLowerCase(FunctionValue func, Node node, Ana return unit.Analyzer._emptyStringValue.SelfSet; } return res; - } - - #region Constructor Overloads - - private OverloadResult[] ArrayOverloads() { - return new OverloadResult[] { - new SimpleOverloadResult("Array", "Create a new and empty array."), - new SimpleOverloadResult("Array", "Create a new array with specific length.", - Parameter("length", "Length of the new array. Must be between 0 and 2^32-1, inclusive.")), - new SimpleOverloadResult("Array", "Create a new array with initial elements.", - Parameter("item1", "Initial element of the array."), - Parameter("item2", "Initial element of the array."), - Parameter("[...]", "Initial element of the array.")) - }; - } - - private OverloadResult[] StringOverloads() { - return new OverloadResult[] { - new SimpleOverloadResult( - "String", - "Create a new string.", - Parameter("thing", "Anything to be converted to a string. If unspecified, an empty string is returned.", isOptional: true) - ) - }; - } - - private OverloadResult[] NumberOverloads() { - return new OverloadResult[] { - new SimpleOverloadResult( - "Number", - "Create a new object wrapper for a numerical value.", - Parameter("value", "The numeric value of the number being created. If unspecified, 0 is returned.", isOptional: true) - ) - }; - } - - private OverloadResult[] BooleanOverloads() { - return new OverloadResult[] { - new SimpleOverloadResult( - "Boolean", - "Create a new object wrapper for a boolean value.", - Parameter("value", "The initial value of the Boolean object. In unspecified, is returned.", isOptional: true) - ) - }; - } - - private OverloadResult[] ErrorOverloads(string errorName = "Error") { - return new OverloadResult[] { - new SimpleOverloadResult( - errorName, - String.Format("Create an {0} object.", errorName), - Parameter("message", "Human-readable description of the error.", isOptional: true) - ) - }; - } - - private OverloadResult[] ObjectOverloads() { - return new OverloadResult[] { - new SimpleOverloadResult( - "Object", - "Create an object wrapper that corresponds to a given value.", - Parameter("value", "Any value. If the value is unspecified, null or undefined, returns an empty object.", isOptional: true)) - }; - } - - private OverloadResult[] RegExpOverloads() { - return new OverloadResult[] { - new SimpleOverloadResult("RegExp", "Create a regular expression for matching text with a pattern.", - Parameter("pattern", "The text of the regular expression"), - Parameter("flags", "A combination of g (global match), i (ignore case) and m (multiline).", isOptional: true)) - }; - } - - private OverloadResult[] FunctionOverloads() { - return new OverloadResult[] { - new SimpleOverloadResult("Function", "Create a new and empty function."), - new SimpleOverloadResult("Function", "Create a new function.", - Parameter("body", "A string containing the JavaScript statements comprising the function definition.")), - new SimpleOverloadResult("Function", "Create a new function with arguments.", - Parameter("arg...", "Name of argument of the function.", isOptional: true), - Parameter("body", "A string containing the JavaScript statements comprising the function definition.")) - }; - } - + } + + #region Constructor Overloads + + private OverloadResult[] ArrayOverloads() { + return new OverloadResult[] { + new SimpleOverloadResult("Array", "Create a new and empty array."), + new SimpleOverloadResult("Array", "Create a new array with specific length.", + Parameter("length", "Length of the new array. Must be between 0 and 2^32-1, inclusive.")), + new SimpleOverloadResult("Array", "Create a new array with initial elements.", + Parameter("item1", "Initial element of the array."), + Parameter("item2", "Initial element of the array."), + Parameter("[...]", "Initial element of the array.")) + }; + } + + private OverloadResult[] StringOverloads() { + return new OverloadResult[] { + new SimpleOverloadResult( + "String", + "Create a new string.", + Parameter("thing", "Anything to be converted to a string. If unspecified, an empty string is returned.", isOptional: true) + ) + }; + } + + private OverloadResult[] NumberOverloads() { + return new OverloadResult[] { + new SimpleOverloadResult( + "Number", + "Create a new object wrapper for a numerical value.", + Parameter("value", "The numeric value of the number being created. If unspecified, 0 is returned.", isOptional: true) + ) + }; + } + + private OverloadResult[] BooleanOverloads() { + return new OverloadResult[] { + new SimpleOverloadResult( + "Boolean", + "Create a new object wrapper for a boolean value.", + Parameter("value", "The initial value of the Boolean object. In unspecified, is returned.", isOptional: true) + ) + }; + } + + private OverloadResult[] ErrorOverloads(string errorName = "Error") { + return new OverloadResult[] { + new SimpleOverloadResult( + errorName, + String.Format("Create an {0} object.", errorName), + Parameter("message", "Human-readable description of the error.", isOptional: true) + ) + }; + } + + private OverloadResult[] ObjectOverloads() { + return new OverloadResult[] { + new SimpleOverloadResult( + "Object", + "Create an object wrapper that corresponds to a given value.", + Parameter("value", "Any value. If the value is unspecified, null or undefined, returns an empty object.", isOptional: true)) + }; + } + + private OverloadResult[] RegExpOverloads() { + return new OverloadResult[] { + new SimpleOverloadResult("RegExp", "Create a regular expression for matching text with a pattern.", + Parameter("pattern", "The text of the regular expression"), + Parameter("flags", "A combination of g (global match), i (ignore case) and m (multiline).", isOptional: true)) + }; + } + + private OverloadResult[] FunctionOverloads() { + return new OverloadResult[] { + new SimpleOverloadResult("Function", "Create a new and empty function."), + new SimpleOverloadResult("Function", "Create a new function.", + Parameter("body", "A string containing the JavaScript statements comprising the function definition.")), + new SimpleOverloadResult("Function", "Create a new function with arguments.", + Parameter("arg...", "Name of argument of the function.", isOptional: true), + Parameter("body", "A string containing the JavaScript statements comprising the function definition.")) + }; + } + #endregion - + #region Building Helpers - + private static MemberAddInfo Member(string name, AnalysisValue value) { return new MemberAddInfo(name, value); } diff --git a/Nodejs/Product/Analysis/Analysis/OverloadResult.cs b/Nodejs/Product/Analysis/Analysis/OverloadResult.cs index 7a5b85deb..d23f48265 100644 --- a/Nodejs/Product/Analysis/Analysis/OverloadResult.cs +++ b/Nodejs/Product/Analysis/Analysis/OverloadResult.cs @@ -44,8 +44,8 @@ public virtual ParameterResult[] Parameters { class SimpleOverloadResult : OverloadResult { private readonly string _documentation; - public SimpleOverloadResult(string name, string documentation) : base(name) { - _documentation = documentation; + public SimpleOverloadResult(string name, string documentation) : base(name) { + _documentation = documentation; } public SimpleOverloadResult(string name, string documentation, params ParameterResult[] parameters) diff --git a/Nodejs/Product/Analysis/Analysis/Values/BuiltinFunctionValue.cs b/Nodejs/Product/Analysis/Analysis/Values/BuiltinFunctionValue.cs index a6d489dd2..12c802881 100644 --- a/Nodejs/Product/Analysis/Analysis/Values/BuiltinFunctionValue.cs +++ b/Nodejs/Product/Analysis/Analysis/Values/BuiltinFunctionValue.cs @@ -171,10 +171,10 @@ internal class SpecializedFunctionValue : BuiltinFunctionValue { public SpecializedFunctionValue(ProjectEntry projectEntry, string name, CallDelegate func, string documentation = null, ExpandoValue prototype = null, params ParameterResult[] signature) : base(projectEntry, name, documentation, prototype, signature) { _func = func; - } - - public SpecializedFunctionValue(ProjectEntry projectEntry, string name, CallDelegate func, OverloadResult[] overloads, string documentation = null, ExpandoValue prototype = null) - : base(projectEntry, name, overloads, documentation, prototype) + } + + public SpecializedFunctionValue(ProjectEntry projectEntry, string name, CallDelegate func, OverloadResult[] overloads, string documentation = null, ExpandoValue prototype = null) + : base(projectEntry, name, overloads, documentation, prototype) { _func = func; }