summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/pegs.nim2
-rw-r--r--lib/pure/times.nim36
2 files changed, 19 insertions, 19 deletions
diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim
index b6877696c..d8fed845a 100644
--- a/lib/pure/pegs.nim
+++ b/lib/pure/pegs.nim
@@ -82,7 +82,7 @@ type
     of pkChar, pkGreedyRepChar: ch: char
     of pkCharChoice, pkGreedyRepSet: charChoice: ref set[char]
     of pkNonTerminal: nt: PNonTerminal
-    of pkBackRef..pkBackRefIgnoreStyle: index: range[1..MaxSubpatterns]
+    of pkBackRef..pkBackRefIgnoreStyle: index: range[0..MaxSubpatterns]
     else: sons: seq[TNode]
   PNonTerminal* = ref TNonTerminal
   
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index 2eb8d692b..86609c8e3 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -338,24 +338,24 @@ when not defined(JS):
     const
       weekDays: array [0..6, TWeekDay] = [
         dSun, dMon, dTue, dWed, dThu, dFri, dSat]
-    result.second = int(tm.second)
-    result.minute = int(tm.minute)
-    result.hour = int(tm.hour)
-    result.monthday = int(tm.monthday)
-    result.month = TMonth(tm.month)
-    result.year = tm.year + 1900'i32
-    result.weekday = weekDays[int(tm.weekDay)]
-    result.yearday = int(tm.yearday)
-    result.isDST = tm.isDST > 0
-    if local:
-      if result.isDST:
-        result.tzname = getTzname().DST
-      else:
-        result.tzname = getTzname().nonDST
-    else:
-      result.tzname = "UTC"
-    
-    result.timezone = if local: getTimezone() else: 0
+    TTimeInfo(second: int(tm.second),
+      minute: int(tm.minute),
+      hour: int(tm.hour),
+      monthday: int(tm.monthday),
+      month: TMonth(tm.month),
+      year: tm.year + 1900'i32,
+      weekday: weekDays[int(tm.weekDay)],
+      yearday: int(tm.yearday),
+      isDST: tm.isDST > 0,
+      tzname: if local:
+          if tm.isDST > 0:
+            getTzname().DST
+          else:
+            getTzname().nonDST
+        else:
+          "UTC",
+      timezone: if local: getTimezone() else: 0
+    )
   
   proc timeInfoToTM(t: TTimeInfo): structTM =
     const