@@ -225,9 +225,9 @@ static private Object InstallPlatformFeature(Object opts)
225225 }
226226
227227 [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Style" , "IDE1006:Naming Styles" , Justification = "ClojureJVM name match" ) ]
228- static private Object read ( PushbackTextReader r ,
229- bool eofIsError , object eofValue ,
230- char ? returnOn , object returnOnValue ,
228+ static private Object read ( PushbackTextReader r ,
229+ bool eofIsError , object eofValue ,
230+ char ? returnOn , object returnOnValue ,
231231 bool isRecursive , object opts , object pendingForms ,
232232 Resolver resolver )
233233 {
@@ -399,14 +399,14 @@ static int readUnicodeChar(PushbackTextReader r, int initch, int radix, int leng
399399 #region Other
400400
401401 // Sentinel values for reading lists
402- static readonly object READ_EOF = new object ( ) ;
403- static readonly object READ_FINISHED = new object ( ) ;
402+ static readonly object READ_EOF = new ( ) ;
403+ static readonly object READ_FINISHED = new ( ) ;
404404
405405 static List < Object > ReadDelimitedList ( char delim , PushbackTextReader r , bool isRecursive , object opts , object pendingForms )
406406 {
407407 int firstLine = r is LineNumberingTextReader lntr ? lntr . LineNumber : - 1 ;
408408
409- List < Object > a = new List < object > ( ) ;
409+ List < Object > a = new ( ) ;
410410 Resolver resolver = ( Resolver ) RT . ReaderResolverVar . deref ( ) ;
411411
412412 for ( ; ; )
@@ -444,7 +444,7 @@ static Symbol garg(int n)
444444 [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Style" , "IDE1006:Naming Styles" , Justification = "ClojureJVM name match" ) ]
445445 static string readSimpleToken ( PushbackTextReader r , char initch )
446446 {
447- StringBuilder sb = new StringBuilder ( ) ;
447+ StringBuilder sb = new ( ) ;
448448 sb . Append ( initch ) ;
449449
450450 for ( ; ; )
@@ -467,9 +467,9 @@ static void readToken(PushbackTextReader r, char initch, out String rawToken, ou
467467
468468 bool rawMode = false ;
469469
470- StringBuilder sbRaw = new StringBuilder ( ) ;
471- StringBuilder sbToken = new StringBuilder ( ) ;
472- StringBuilder sbMask = new StringBuilder ( ) ;
470+ StringBuilder sbRaw = new ( ) ;
471+ StringBuilder sbToken = new ( ) ;
472+ StringBuilder sbMask = new ( ) ;
473473
474474 if ( allowSymEscape && initch == '|' )
475475 {
@@ -574,10 +574,10 @@ public static object InterpretToken(string rawToken, string token, string mask,
574574 //static Regex symbolPat = new Regex("[:]?([\\D&&[^/]].*/)?(/|[\\D&&[^/]][^/]*)");
575575 //static readonly Regex arraySymbolPat = new Regex("([\\D&&[^/:]].*)/([1-9])");
576576
577- static readonly Regex symbolPat = new Regex ( "^[:]?([^\\ p{Nd}/].*/)?(/|[^\\ p{Nd}/][^/]*)$" ) ;
578- static readonly Regex arraySymbolPat = new Regex ( "^([^\\ p{Nd}/].*/)([1-9])$" ) ;
579- static readonly Regex keywordPat = new Regex ( "^[:]?([^/].*/)?(/|[^/][^/]*)$" ) ;
580- static readonly Regex argPat = new Regex ( "^%(?:(&)|([1-9][0-9]*))?$" ) ;
577+ static readonly Regex symbolPat = new ( "^[:]?([^\\ p{Nd}/].*/)?(/|[^\\ p{Nd}/][^/]*)$" ) ;
578+ static readonly Regex arraySymbolPat = new ( "^([^\\ p{Nd}/].*/)([1-9])$" ) ;
579+ static readonly Regex keywordPat = new ( "^[:]?([^/].*/)?(/|[^/][^/]*)$" ) ;
580+ static readonly Regex argPat = new ( "^%(?:(&)|([1-9][0-9]*))?$" ) ;
581581
582582 [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Style" , "IDE0060:Remove unused parameter" , Justification = "Standard API" ) ]
583583 private static void ExtractNamesUsingMask ( string token , string maskNS , string maskName , out string ns , out string name )
@@ -665,7 +665,7 @@ static object matchSymbol(string token, string mask, Resolver resolver)
665665 else
666666 {
667667 Match m3 = arraySymbolPat . Match ( mask ) ;
668- if ( m3 . Success )
668+ if ( m3 . Success )
669669 {
670670 string maskNS = m3 . Groups [ 1 ] . Value ;
671671 string maskName = m3 . Groups [ 2 ] . Value ;
@@ -789,7 +789,7 @@ public static bool NameRequiresEscaping(string s)
789789
790790 public static string VbarEscape ( string s )
791791 {
792- StringBuilder sb = new StringBuilder ( ) ;
792+ StringBuilder sb = new ( ) ;
793793 sb . Append ( '|' ) ;
794794
795795 foreach ( char c in s )
@@ -806,14 +806,14 @@ public static string VbarEscape(string s)
806806
807807 #region Reading numbers
808808
809- static readonly Regex intRE = new Regex ( "^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?$" ) ;
810- static readonly Regex ratioRE = new Regex ( "^([-+]?[0-9]+)/([0-9]+)$" ) ;
811- static readonly Regex floatRE = new Regex ( "^([-+]?[0-9]+(\\ .[0-9]*)?([eE][-+]?[0-9]+)?)(M)?$" ) ;
809+ static readonly Regex intRE = new ( "^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?$" ) ;
810+ static readonly Regex ratioRE = new ( "^([-+]?[0-9]+)/([0-9]+)$" ) ;
811+ static readonly Regex floatRE = new ( "^([-+]?[0-9]+(\\ .[0-9]*)?([eE][-+]?[0-9]+)?)(M)?$" ) ;
812812
813813 [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Style" , "IDE1006:Naming Styles" , Justification = "ClojureJVM name match" ) ]
814814 static object readNumber ( PushbackTextReader r , char initch )
815815 {
816- StringBuilder sb = new StringBuilder ( ) ;
816+ StringBuilder sb = new ( ) ;
817817 sb . Append ( initch ) ;
818818
819819 for ( ; ; )
@@ -982,7 +982,7 @@ public sealed class StringReader : ReaderBase
982982 {
983983 protected override object Read ( PushbackTextReader r , char doublequote , object opts , object pendingForms )
984984 {
985- StringBuilder sb = new StringBuilder ( ) ;
985+ StringBuilder sb = new ( ) ;
986986
987987 for ( int ch = r . Read ( ) ; ch != '"' ; ch = r . Read ( ) )
988988 {
@@ -1169,11 +1169,11 @@ public override object invoke(object reader, object colon, object opts, object p
11691169 if ( isWhitespace ( nextChar ) )
11701170 {
11711171 // the #:: { } case or an error
1172- if ( auto )
1172+ if ( auto )
11731173 {
11741174 while ( isWhitespace ( nextChar ) )
11751175 nextChar = r . Read ( ) ;
1176- if ( nextChar != '{' )
1176+ if ( nextChar != '{' )
11771177 {
11781178 Unread ( r , nextChar ) ;
11791179 throw new Exception ( "Namespaced map must specify a namespace" ) ;
@@ -1185,11 +1185,11 @@ public override object invoke(object reader, object colon, object opts, object p
11851185 throw new Exception ( "Namespaced map must specify a namespace" ) ;
11861186 }
11871187 }
1188- else if ( nextChar != '{' )
1188+ else if ( nextChar != '{' )
11891189 {
11901190 // #:foo { } or #::foo { }
11911191 Unread ( r , nextChar ) ;
1192- osym = read ( r , true , null , false , opts , pendingForms ) ;
1192+ osym = read ( r , true , null , false , opts , pendingForms ) ;
11931193 nextChar = r . Read ( ) ;
11941194 while ( isWhitespace ( nextChar ) )
11951195 nextChar = r . Read ( ) ;
@@ -1266,7 +1266,7 @@ public override object invoke(object reader, object colon, object opts, object p
12661266 {
12671267 if ( s . Namespace == null )
12681268 key = Symbol . intern ( ns , s . Name ) ;
1269- else if ( s . Namespace . Equals ( "_" ) )
1269+ else if ( s . Namespace . Equals ( "_" ) )
12701270 key = Symbol . intern ( null , s . Name ) ;
12711271 }
12721272 }
@@ -1418,26 +1418,26 @@ private static object AnalyzeSyntaxQuote(object form, out bool checkMeta)
14181418 if ( rc != null )
14191419 csym = rc ;
14201420 }
1421- else
1421+ else
14221422 csym = Compiler . resolveSymbol ( csym ) ;
14231423 sym = Symbol . intern ( null , csym . Name + "." ) ;
1424-
1424+
14251425 }
14261426 else if ( sym . Namespace == null && sym . Name . StartsWith ( "." ) )
14271427 {
14281428 // simply quote method names
14291429 }
1430- else if ( resolver != null )
1430+ else if ( resolver != null )
14311431 {
14321432 Symbol nsym = null ;
1433- if ( sym . Namespace != null )
1433+ if ( sym . Namespace != null )
14341434 {
14351435 Symbol alias = Symbol . intern ( null , sym . Namespace ) ;
14361436 nsym = resolver . ResolveClass ( alias ) ;
14371437 if ( nsym == null )
14381438 nsym = resolver . ResolveAlias ( alias ) ;
14391439 }
1440- if ( nsym != null )
1440+ if ( nsym != null )
14411441 {
14421442 //Classname/foo => package.qualified.Classname/foo
14431443 sym = Symbol . intern ( nsym . Name , sym . Name ) ;
@@ -1464,7 +1464,7 @@ private static object AnalyzeSyntaxQuote(object form, out bool checkMeta)
14641464 if ( t != null )
14651465 {
14661466 // Classname/foo -> package.qualified.Classname/foo
1467- sym = Symbol . intern ( t . Name , sym . Name ) ;
1467+ sym = Symbol . intern ( t . FullName , sym . Name ) ;
14681468 }
14691469 else
14701470 sym = Compiler . resolveSymbol ( sym ) ;
@@ -1669,8 +1669,8 @@ protected override object Read(PushbackTextReader r, char caret, object opts, ob
16691669 {
16701670 if ( startLine != - 1 && o is ISeq )
16711671 {
1672- metaAsMap = metaAsMap . assoc ( RT . LineKey , RT . get ( metaAsMap , RT . LineKey , startLine ) ) ;
1673- metaAsMap = metaAsMap . assoc ( RT . ColumnKey , RT . get ( metaAsMap , RT . ColumnKey , startCol ) ) ;
1672+ metaAsMap = metaAsMap . assoc ( RT . LineKey , RT . get ( metaAsMap , RT . LineKey , startLine ) ) ;
1673+ metaAsMap = metaAsMap . assoc ( RT . ColumnKey , RT . get ( metaAsMap , RT . ColumnKey , startCol ) ) ;
16741674 metaAsMap = metaAsMap . assoc ( RT . SourceSpanKey , RT . get ( metaAsMap , RT . SourceSpanKey , RT . map (
16751675 RT . StartLineKey , startLine ,
16761676 RT . StartColumnKey , startCol ,
@@ -1724,7 +1724,7 @@ public sealed class RegexReader : ReaderBase
17241724 {
17251725 protected override object Read ( PushbackTextReader r , char doublequote , object opts , object pendingForms )
17261726 {
1727- StringBuilder sb = new StringBuilder ( ) ;
1727+ StringBuilder sb = new ( ) ;
17281728 for ( int ch = r . Read ( ) ; ch != '"' ; ch = r . Read ( ) )
17291729 {
17301730 if ( ch == - 1 )
@@ -2080,7 +2080,7 @@ public static bool HasFeature(Object feature, Object opts)
20802080 return custom != null && custom . contains ( feature ) ;
20812081 }
20822082
2083- static readonly object READ_STARTED = new object ( ) ;
2083+ static readonly object READ_STARTED = new ( ) ;
20842084
20852085 [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Style" , "IDE1006:Naming Styles" , Justification = "ClojureJVM name match" ) ]
20862086 public static Object readCondDelimited ( PushbackTextReader r , bool splicing , object opts , object pendingForms )
@@ -2120,7 +2120,7 @@ public static Object readCondDelimited(PushbackTextReader r, bool splicing, obje
21202120
21212121 //Read the form corresponding to the feature, and assign it to result if everything is kosher
21222122
2123- form = read ( r , false , READ_EOF , ')' , READ_FINISHED , true , opts , pendingForms , ( Resolver ) RT . ReaderResolverVar . deref ( ) ) ;
2123+ form = read ( r , false , READ_EOF , ')' , READ_FINISHED , true , opts , pendingForms , ( Resolver ) RT . ReaderResolverVar . deref ( ) ) ;
21242124
21252125 if ( form == READ_EOF )
21262126 {
0 commit comments