001    // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
002    // for details. All rights reserved. Use of this source code is governed by a
003    // BSD-style license that can be found in the LICENSE file.
004    
005    package com.google.dart.compiler.backend.js.ast;
006    
007    public abstract class JsNumberLiteral extends JsLiteral.JsValueLiteral {
008        public static final class JsDoubleLiteral extends JsNumberLiteral {
009            public final double value;
010    
011            JsDoubleLiteral(double value) {
012                this.value = value;
013            }
014    
015            @Override
016            public void accept(JsVisitor v) {
017                v.visitDouble(this);
018            }
019    
020            public String toString() {
021                return String.valueOf(value);
022            }
023        }
024    
025        public static final class JsIntLiteral extends JsNumberLiteral {
026            public final int value;
027    
028            JsIntLiteral(int value) {
029                this.value = value;
030            }
031    
032            @Override
033            public void accept(JsVisitor v) {
034                v.visitInt(this);
035            }
036    
037            public String toString() {
038                return String.valueOf(value);
039            }
040        }
041    }