Permalink
Browse files

GitHub Issue #55: OUTPUT args to proc declaration without parens

  • Loading branch information...
1 parent 065dea2 commit c87bc88825832655d368f932d9f342f243f883b0 @TaoK committed Sep 2, 2012
@@ -540,6 +540,10 @@ public XmlDocument ParseSQL(ITokenList tokenList)
isSprocArgument = true;
}
+ //Also proc definitions - argument lists without parens
+ if (sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_DDL_PROCEDURAL_BLOCK))
+ isSprocArgument = true;
+
if (!isSprocArgument)
{
sqlTree.EscapeMergeAction();
@@ -334,5 +334,11 @@ GO
EXECUTE sp_MS_marksystemobject 'sp_ScriptTable'
+go
+
+CREATE PROCEDURE AnotherTest
+ @FirstValue Int,
+ @TestValue BIT = 0 OUTPUT
+AS
+SELECT 0
-
@@ -334,5 +334,12 @@ Modifications:
</WhiteSpace><Clause><OtherKeyword>EXECUTE</OtherKeyword><WhiteSpace> </WhiteSpace><Other>sp_MS_marksystemobject</Other><WhiteSpace> </WhiteSpace><String>sp_ScriptTable</String><WhiteSpace>
+</WhiteSpace></Clause></SqlStatement><BatchSeparator><OtherKeyword>go</OtherKeyword></BatchSeparator><SqlStatement><WhiteSpace>
+
+</WhiteSpace><Clause><DDLProceduralBlock><OtherKeyword>CREATE</OtherKeyword><WhiteSpace> </WhiteSpace><OtherKeyword>PROCEDURE</OtherKeyword><WhiteSpace> </WhiteSpace><Other>AnotherTest</Other><WhiteSpace>
+ </WhiteSpace><Other>@FirstValue</Other><WhiteSpace> </WhiteSpace><DataTypeKeyword>Int</DataTypeKeyword><Comma>,</Comma><WhiteSpace>
+ </WhiteSpace><Other>@TestValue</Other><WhiteSpace> </WhiteSpace><DataTypeKeyword>BIT</DataTypeKeyword><WhiteSpace> </WhiteSpace><EqualsSign>=</EqualsSign><WhiteSpace> </WhiteSpace><NumberValue>0</NumberValue><WhiteSpace> </WhiteSpace><OtherKeyword>OUTPUT</OtherKeyword><WhiteSpace>
+</WhiteSpace><DDLAsBlock><ContainerOpen><OtherKeyword>AS</OtherKeyword></ContainerOpen><ContainerContentBody><SqlStatement><WhiteSpace>
+</WhiteSpace><Clause><OtherKeyword>SELECT</OtherKeyword><WhiteSpace> </WhiteSpace><NumberValue>0</NumberValue><WhiteSpace>
- </WhiteSpace></Clause></SqlStatement></SqlRoot>
+</WhiteSpace></Clause></SqlStatement></ContainerContentBody></DDLAsBlock></DDLProceduralBlock></Clause></SqlStatement></SqlRoot>
@@ -394,3 +394,9 @@ END
GO
EXECUTE sp_MS_marksystemobject 'sp_ScriptTable'
+GO
+
+CREATE PROCEDURE AnotherTest @FirstValue INT
+ ,@TestValue BIT = 0 OUTPUT
+AS
+SELECT 0

0 comments on commit c87bc88

Please sign in to comment.