about summary refs log tree commit diff stats
path: root/html/matt-chat/uswds/img/material-icons/add_to_home_screen.svg
diff options
context:
space:
mode:
Diffstat (limited to 'html/matt-chat/uswds/img/material-icons/add_to_home_screen.svg')
-rw-r--r--html/matt-chat/uswds/img/material-icons/add_to_home_screen.svg1
1 files changed, 1 insertions, 0 deletions
diff --git a/html/matt-chat/uswds/img/material-icons/add_to_home_screen.svg b/html/matt-chat/uswds/img/material-icons/add_to_home_screen.svg
new file mode 100644
index 0000000..1f4bd73
--- /dev/null
+++ b/html/matt-chat/uswds/img/material-icons/add_to_home_screen.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M18 1.01 8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM10 15h2V8H5v2h3.59L3 15.59 4.41 17 10 11.41z"/></svg>
\ No newline at end of file
>
39049e151 ^
3897a8c44 ^
39049e151 ^
3897a8c44 ^
39049e151 ^





3897a8c44 ^

39049e151 ^

9b44ca17c ^

39049e151 ^
3897a8c44 ^
92b8fac94 ^
3897a8c44 ^

39049e151 ^
3897a8c44 ^


39049e151 ^

3897a8c44 ^
39049e151 ^








3897a8c44 ^
39049e151 ^

3897a8c44 ^
39049e151 ^
9b44ca17c ^

39049e151 ^
3897a8c44 ^
39049e151 ^



3897a8c44 ^
39049e151 ^




3a13706d7 ^
3897a8c44 ^
39049e151 ^

3897a8c44 ^
39049e151 ^

3897a8c44 ^
39049e151 ^


3897a8c44 ^
39049e151 ^


3897a8c44 ^
39049e151 ^


3897a8c44 ^
39049e151 ^
3897a8c44 ^
39049e151 ^

92b8fac94 ^
3897a8c44 ^
39049e151 ^
3897a8c44 ^
39049e151 ^





3897a8c44 ^
39049e151 ^

3897a8c44 ^
39049e151 ^
3897a8c44 ^

9b44ca17c ^
e6c5622aa ^
9b44ca17c ^














39049e151 ^
35567a1eb ^

e6c5622aa ^
39049e151 ^

3897a8c44 ^
39049e151 ^
2166b7bc4 ^
b72528d63 ^
39049e151 ^


3897a8c44 ^
39049e151 ^



3897a8c44 ^
39049e151 ^
2166b7bc4 ^
e6c5622aa ^
39049e151 ^


3897a8c44 ^
39049e151 ^
aeff57627 ^
3897a8c44 ^


f47165af1 ^


92b8fac94 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

 
                            







                                                   



                                                            




               
               
                       
                   
                                                 
         
             





                                                                   

                                 

                                                    

                                                   
               
                       
                                                                          

                                 
                                    


                                      

                          
                                                                     








                                                                       
                                                               

                                               
                                                    
                                                     

                                             
                                                                       
                                                



                                                                    
                          




                                                                
                                                                 
 

                                                 
                         

                                                      
                                                     


                                                                      
 


                                                                    
                          


                                                                
 
                                                    
                             

                                  
                                                                              
                                 
                                
                                                                          





                                                                              
                          

                                                                
                        
                                         

                                             
                                               
                                                           














                                                                          
                                              

                                                            
                                                             

                                                        
             
                
                                      
                                                                             


                                                                              
                            



                                                                              
                            
                                         
                                             
             


                                                                              
                            
                                         
                                             


                                          


                                                       
                                                     
#
#
#           The Nim Compiler
#        (c) Copyright 2013 Andreas Rumpf
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

## Type info generation for the JS backend.

proc genTypeInfo(p: PProc, typ: PType): Rope
proc genObjectFields(p: PProc, typ: PType, n: PNode): Rope =
  var
    s, u: Rope
    length: int
    field: PSym
    b: PNode
  result = nil
  case n.kind
  of nkRecList:
    length = sonsLen(n)
    if length == 1:
      result = genObjectFields(p, typ, n.sons[0])
    else:
      s = nil
      for i in countup(0, length - 1):
        if i > 0: add(s, ", " & tnl)
        add(s, genObjectFields(p, typ, n.sons[i]))
      result = ("{kind: 2, len: $1, offset: 0, " &
          "typ: null, name: null, sons: [$2]}") % [rope(length), s]
  of nkSym:
    field = n.sym
    s = genTypeInfo(p, field.typ)
    result = ("{kind: 1, offset: \"$1\", len: 0, " &
        "typ: $2, name: $3, sons: null}") %
                   [mangleName(field, p.target), s,
                    makeJSString(field.name.s)]
  of nkRecCase:
    length = sonsLen(n)
    if (n.sons[0].kind != nkSym): internalError(n.info, "genObjectFields")
    field = n.sons[0].sym
    s = genTypeInfo(p, field.typ)
    for i in countup(1, length - 1):
      b = n.sons[i]           # branch
      u = nil
      case b.kind
      of nkOfBranch:
        if sonsLen(b) < 2:
          internalError(b.info, "genObjectFields; nkOfBranch broken")
        for j in countup(0, sonsLen(b) - 2):
          if u != nil: add(u, ", ")
          if b.sons[j].kind == nkRange:
            addf(u, "[$1, $2]", [rope(getOrdValue(b.sons[j].sons[0])),
                                 rope(getOrdValue(b.sons[j].sons[1]))])
          else:
            add(u, rope(getOrdValue(b.sons[j])))
      of nkElse:
        u = rope(lengthOrd(field.typ))
      else: internalError(n.info, "genObjectFields(nkRecCase)")
      if result != nil: add(result, ", " & tnl)
      addf(result, "[SetConstr($1), $2]",
           [u, genObjectFields(p, typ, lastSon(b))])
    result = ("{kind: 3, offset: \"$1\", len: $3, " &
        "typ: $2, name: $4, sons: [$5]}") % [
        mangleName(field, p.target), s,
        rope(lengthOrd(field.typ)), makeJSString(field.name.s), result]
  else: internalError(n.info, "genObjectFields")

proc genObjectInfo(p: PProc, typ: PType, name: Rope) =
  var s = ("var $1 = {size: 0, kind: $2, base: null, node: null, " &
           "finalizer: null};$n") % [name, rope(ord(typ.kind))]
  prepend(p.g.typeInfo, s)
  addf(p.g.typeInfo, "var NNI$1 = $2;$n",
       [rope(typ.id), genObjectFields(p, typ, typ.n)])
  addf(p.g.typeInfo, "$1.node = NNI$2;$n", [name, rope(typ.id)])
  if (typ.kind == tyObject) and (typ.sons[0] != nil):
    addf(p.g.typeInfo, "$1.base = $2;$n",
         [name, genTypeInfo(p, typ.sons[0].skipTypes(skipPtrs))])

proc genTupleFields(p: PProc, typ: PType): Rope =
  var s: Rope = nil
  for i in 0 .. <typ.len:
    if i > 0: add(s, ", " & tnl)
    s.addf("{kind: 1, offset: \"Field$1\", len: 0, " &
           "typ: $2, name: \"Field$1\", sons: null}",
           [i.rope, genTypeInfo(p, typ.sons[i])])
  result = ("{kind: 2, len: $1, offset: 0, " &
            "typ: null, name: null, sons: [$2]}") % [rope(typ.len), s]

proc genTupleInfo(p: PProc, typ: PType, name: Rope) =
  var s = ("var $1 = {size: 0, kind: $2, base: null, node: null, " &
           "finalizer: null};$n") % [name, rope(ord(typ.kind))]
  prepend(p.g.typeInfo, s)
  addf(p.g.typeInfo, "var NNI$1 = $2;$n",
       [rope(typ.id), genTupleFields(p, typ)])
  addf(p.g.typeInfo, "$1.node = NNI$2;$n", [name, rope(typ.id)])

proc genEnumInfo(p: PProc, typ: PType, name: Rope) =
  let length = sonsLen(typ.n)
  var s: Rope = nil
  for i in countup(0, length - 1):
    if (typ.n.sons[i].kind != nkSym): internalError(typ.n.info, "genEnumInfo")
    let field = typ.n.sons[i].sym
    if i > 0: add(s, ", " & tnl)
    let extName = if field.ast == nil: field.name.s else: field.ast.strVal
    addf(s, "{kind: 1, offset: $1, typ: $2, name: $3, len: 0, sons: null}",
         [rope(field.position), name, makeJSString(extName)])
  var n = ("var NNI$1 = {kind: 2, offset: 0, typ: null, " &
      "name: null, len: $2, sons: [$3]};$n") % [rope(typ.id), rope(length), s]
  s = ("var $1 = {size: 0, kind: $2, base: null, node: null, " &
       "finalizer: null};$n") % [name, rope(ord(typ.kind))]
  prepend(p.g.typeInfo, s)
  add(p.g.typeInfo, n)
  addf(p.g.typeInfo, "$1.node = NNI$2;$n", [name, rope(typ.id)])
  if typ.sons[0] != nil:
    addf(p.g.typeInfo, "$1.base = $2;$n",
         [name, genTypeInfo(p, typ.sons[0])])

proc genEnumInfoPHP(p: PProc; t: PType): Rope =
  let t = t.skipTypes({tyGenericInst, tyDistinct, tyAlias})
  result = "$$NTI$1" % [rope(t.id)]
  p.declareGlobal(t.id, result)
  if containsOrIncl(p.g.typeInfoGenerated, t.id): return

  let length = sonsLen(t.n)
  var s: Rope = nil
  for i in countup(0, length - 1):
    if (t.n.sons[i].kind != nkSym): internalError(t.n.info, "genEnumInfo")
    let field = t.n.sons[i].sym
    if i > 0: add(s, ", " & tnl)
    let extName = if field.ast == nil: field.name.s else: field.ast.strVal
    addf(s, "$# => $#$n",
         [rope(field.position), makeJSString(extName)])
  prepend(p.g.typeInfo, "$$$# = $#;$n" % [result, s])

proc genTypeInfo(p: PProc, typ: PType): Rope =
  if p.target == targetPHP:
    return makeJSString(typeToString(typ, preferModuleInfo))
  let t = typ.skipTypes({tyGenericInst, tyDistinct, tyAlias})
  result = "NTI$1" % [rope(t.id)]
  if containsOrIncl(p.g.typeInfoGenerated, t.id): return
  case t.kind
  of tyDistinct:
    result = genTypeInfo(p, t.sons[0])
  of tyPointer, tyProc, tyBool, tyChar, tyCString, tyString, tyInt..tyUInt64:
    var s =
      "var $1 = {size: 0,kind: $2,base: null,node: null,finalizer: null};$n" %
      [result, rope(ord(t.kind))]
    prepend(p.g.typeInfo, s)
  of tyVar, tyRef, tyPtr, tySequence, tyRange, tySet:
    var s =
      "var $1 = {size: 0,kind: $2,base: null,node: null,finalizer: null};$n" %
              [result, rope(ord(t.kind))]
    prepend(p.g.typeInfo, s)
    addf(p.g.typeInfo, "$1.base = $2;$n",
         [result, genTypeInfo(p, t.lastSon)])
  of tyArray:
    var s =
      "var $1 = {size: 0,kind: $2,base: null,node: null,finalizer: null};$n" %
              [result, rope(ord(t.kind))]
    prepend(p.g.typeInfo, s)
    addf(p.g.typeInfo, "$1.base = $2;$n",
         [result, genTypeInfo(p, t.sons[1])])
  of tyEnum: genEnumInfo(p, t, result)
  of tyObject: genObjectInfo(p, t, result)
  of tyTuple: genTupleInfo(p, t, result)
  of tyStatic:
    if t.n != nil: result = genTypeInfo(p, lastSon t)
    else: internalError("genTypeInfo(" & $t.kind & ')')
  else: internalError("genTypeInfo(" & $t.kind & ')')